Removed {} and [] from the punctuation mode

This commit is contained in:
Vuong BUI 2020-11-27 21:51:56 +01:00 committed by GitHub
parent eafc22c36e
commit 69c32a4e75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -740,20 +740,6 @@ function punctuateWord(previousWord, currentWord, index, maxindex) {
) {
//1% chance to add parentheses
word = `(${word})`;
} else if (
Math.random() < 0.01 &&
getLastChar(previousWord) != "," &&
getLastChar(previousWord) != "."
) {
//1% chance to add braces
word = `{${word}}`;
} else if (
Math.random() < 0.01 &&
getLastChar(previousWord) != "," &&
getLastChar(previousWord) != "."
) {
//1% chance to add brackets
word = `[${word}]`;
} else if (Math.random() < 0.01) {
//1% chance to add a colon
word = word + ":";