mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-06 05:43:47 +08:00
Dont capitalise after punctuation in code alphabets
This commit is contained in:
parent
f887f86e66
commit
5bc602add8
1 changed files with 6 additions and 5 deletions
|
@ -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 &&
|
||||
|
|
Loading…
Reference in a new issue