replacing spaces when adding words. closes #2355

This commit is contained in:
Miodec 2022-01-26 13:06:15 +01:00
parent ee3fa34fe7
commit 2706806529

View file

@ -1240,7 +1240,6 @@ export async function addWord() {
regenarationCount < 100 &&
(previousWord == randomWord ||
previousWord2 == randomWord ||
randomWord.indexOf(" ") > -1 ||
(!Config.punctuation && randomWord == "I"))
) {
regenarationCount++;
@ -1256,6 +1255,9 @@ export async function addWord() {
randomWord = LazyMode.replaceAccents(randomWord, language.accents);
}
randomWord = randomWord.replace(/ +/gm, " ");
randomWord = randomWord.replace(/^ | $/gm, "");
if (Config.funbox === "rAnDoMcAsE") {
let randomcaseword = "";
for (let i = 0; i < randomWord.length; i++) {