From 5bc602add8ca4b0b4fee841a8d2b198e25c79cc5 Mon Sep 17 00:00:00 2001 From: Lucas Fern <35369153+lucas-fern@users.noreply.github.com> Date: Fri, 1 Jan 2021 18:54:30 +1100 Subject: [PATCH] Dont capitalise after punctuation in code alphabets --- src/js/script.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/js/script.js b/src/js/script.js index 24a6857bd..7366b7592 100644 --- a/src/js/script.js +++ b/src/js/script.js @@ -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 &&