mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-08 16:34:45 +08:00
replacing spaces when adding words. closes #2355
This commit is contained in:
parent
ee3fa34fe7
commit
2706806529
1 changed files with 3 additions and 1 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue