diff --git a/simple-translate/translate.js b/simple-translate/translate.js index f86400a..3ef3769 100644 --- a/simple-translate/translate.js +++ b/simple-translate/translate.js @@ -13,7 +13,7 @@ class Translate { translate(sourceWord, sourceLang = 'auto', targetLang) { //改行で分割 - const sourceLines = sourceWord.split("\n"); + const sourceLines = sourceWord.trim().split("\n"); let promises = []; for (let sourceLine of sourceLines) {