Allow numbers without punctuation mode (#2151) by DanGonite57

This commit is contained in:
DanGonite57 2021-12-07 12:28:58 +00:00 committed by GitHub
parent f6848d0937
commit aeca84e752
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -912,14 +912,14 @@ export async function init() {
if (Config.punctuation) {
randomWord = punctuateWord(previousWord, randomWord, i, wordsBound);
}
if (Config.numbers && Config.punctuation) {
if (Config.numbers) {
if (
Math.random() < 0.1 &&
i !== 0 &&
Misc.getLastChar(previousWord) !== "."
) {
randomWord = Misc.getNumbers(4);
if (i == wordsBound - 1) {
if (i == wordsBound - 1 && Config.punctuation) {
randomWord += ".";
}
}