fixed pipe delimiter not working with new lines

fixes #2772
This commit is contained in:
Miodec 2022-04-19 22:18:05 +02:00
parent c5712c48a8
commit 82f2eb2af7

View file

@ -865,8 +865,10 @@ export async function init(): Promise<void> {
TestWords.setHasTab(true);
}
if (/ +/.test(randomWord)) {
const randomList = randomWord.split(" ");
const te = randomWord.replace("\n", "\n ").trim();
if (/ +/.test(te)) {
const randomList = te.split(" ");
let id = 0;
while (id < randomList.length) {
TestWords.words.push(randomList[id]);