mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 21:33:40 +08:00
fixed interchangable quotes
This commit is contained in:
parent
3fa18310ea
commit
2e2cc91198
1 changed files with 17 additions and 9 deletions
|
@ -1156,7 +1156,7 @@ function updateWordElement(showError) {
|
|||
charCorrect = true;
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch {}
|
||||
|
||||
let currentLetter = currentWord[i];
|
||||
let tabChar = "";
|
||||
|
@ -5426,16 +5426,24 @@ function handleAlpha(event) {
|
|||
}
|
||||
}
|
||||
|
||||
if (event.key === "'" || event.key === "’") {
|
||||
if (nextCharInWord == "'" || nextCharInWord == "’") {
|
||||
thisCharCorrect = true;
|
||||
}
|
||||
if (event.key === "’" && nextCharInWord == "'") {
|
||||
event.key = "'";
|
||||
thisCharCorrect = true;
|
||||
}
|
||||
|
||||
if (event.key === '"' || event.key === "”") {
|
||||
if (nextCharInWord == '"' || nextCharInWord == "”") {
|
||||
thisCharCorrect = true;
|
||||
}
|
||||
if (event.key === "'" && nextCharInWord == "’") {
|
||||
event.key = "’";
|
||||
thisCharCorrect = true;
|
||||
}
|
||||
|
||||
if (event.key === "”" && nextCharInWord == '"') {
|
||||
event.key = '"';
|
||||
thisCharCorrect = true;
|
||||
}
|
||||
|
||||
if (event.key === '"' && nextCharInWord == "”") {
|
||||
event.key = "”";
|
||||
thisCharCorrect = true;
|
||||
}
|
||||
|
||||
if (!thisCharCorrect) {
|
||||
|
|
Loading…
Reference in a new issue