Trim translation source text
This commit is contained in:
parent
23408bcd25
commit
3286e16332
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue