Dont capitalise after punctuation in code alphabets

This commit is contained in:
Lucas Fern 2021-01-01 18:54:30 +11:00
parent f887f86e66
commit 5bc602add8

View file

@ -719,12 +719,13 @@ function punctuateWord(previousWord, currentWord, index, maxindex) {
let word = currentWord;
if (
index == 0 ||
Misc.getLastChar(previousWord) == "." ||
Misc.getLastChar(previousWord) == "?" ||
Misc.getLastChar(previousWord) == "!"
(index == 0 ||
Misc.getLastChar(previousWord) == "." ||
Misc.getLastChar(previousWord) == "?" ||
Misc.getLastChar(previousWord) == "!") &&
config.language.split("_")[0] != "code"
) {
//always capitalise the first word or if there was a dot
//always capitalise the first word or if there was a dot unless using a code alphabet
word = Misc.capitalizeFirstLetter(word);
} else if (
(Math.random() < 0.1 &&