mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-23 00:37:29 +08:00
fixed : or ; appearing after each other
This commit is contained in:
parent
a2ff129ad1
commit
c8f2db689a
|
@ -325,7 +325,13 @@ export function punctuateWord(previousWord, currentWord, index, maxindex) {
|
|||
} else {
|
||||
word = `(${word})`;
|
||||
}
|
||||
} else if (Math.random() < 0.013) {
|
||||
} else if (
|
||||
Math.random() < 0.013 &&
|
||||
Misc.getLastChar(previousWord) != "," &&
|
||||
Misc.getLastChar(previousWord) != "." &&
|
||||
Misc.getLastChar(previousWord) != ";" &&
|
||||
Misc.getLastChar(previousWord) != ":"
|
||||
) {
|
||||
if (currentLanguage == "french") {
|
||||
word = ":";
|
||||
} else if (currentLanguage == "greek") {
|
||||
|
@ -344,7 +350,8 @@ export function punctuateWord(previousWord, currentWord, index, maxindex) {
|
|||
Math.random() < 0.015 &&
|
||||
Misc.getLastChar(previousWord) != "," &&
|
||||
Misc.getLastChar(previousWord) != "." &&
|
||||
Misc.getLastChar(previousWord) != ";"
|
||||
Misc.getLastChar(previousWord) != ";" &&
|
||||
Misc.getLastChar(previousWord) != ":"
|
||||
) {
|
||||
if (currentLanguage == "french") {
|
||||
word = ";";
|
||||
|
|
Loading…
Reference in a new issue