Trim translation source text

This commit is contained in:
sienori 2018-06-25 18:48:33 +09:00
parent 23408bcd25
commit 3286e16332

View file

@ -13,7 +13,7 @@ class Translate {
translate(sourceWord, sourceLang = 'auto', targetLang) { translate(sourceWord, sourceLang = 'auto', targetLang) {
//改行で分割 //改行で分割
const sourceLines = sourceWord.split("\n"); const sourceLines = sourceWord.trim().split("\n");
let promises = []; let promises = [];
for (let sourceLine of sourceLines) { for (let sourceLine of sourceLines) {