Trim translation source text

This commit is contained in:
sienori 2018-11-15 21:24:18 +09:00
parent 85ed092113
commit 3dcc2229a5

View file

@ -11,6 +11,8 @@ class Translate {
}
async translate(sourceWord, sourceLang = "auto", targetLang) {
sourceWord = sourceWord.trim();
const result = await this.sendRequest(sourceWord, sourceLang, targetLang);
return this.formatResult(result);
}