fixed interchangable quotes

This commit is contained in:
Miodec 2021-01-28 19:08:21 +00:00
parent 3fa18310ea
commit 2e2cc91198

View file

@ -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) {