regenerating word if it contains punctutaion but punctuation is disabled

This commit is contained in:
Miodec 2022-05-30 18:00:26 +02:00
parent e82dbff2b1
commit 2263c5d069

View file

@ -697,7 +697,8 @@ async function getNextWord(
regenarationCount < 100 &&
(previousWord == randomWord ||
previousWord2 == randomWord ||
(!Config.punctuation && randomWord == "I"))
(!Config.punctuation && randomWord == "I") ||
(!Config.punctuation && /[-=_+[\]{};'\\:"|,./<>?]/i.test(randomWord)))
) {
regenarationCount++;
randomWord = wordset.randomWord();