mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 15:26:15 +08:00
fix: old safari versions not being able to load the site due to using unsupported regex
This commit is contained in:
parent
82a24e4ee7
commit
5373984ec9
|
@ -237,8 +237,8 @@ function apply(): void {
|
|||
text = text.replace(/[\u200B-\u200D\u2060\uFEFF]/g, "");
|
||||
|
||||
if ($(`${popup} .replaceControlCharacters input`).prop("checked")) {
|
||||
text = text.replace(/(?<!\\)\\t/gm, "\t");
|
||||
text = text.replace(/(?<!\\)\\n/gm, "\n");
|
||||
text = text.replace(/([^\\]|^)\\t/gm, "$1\t");
|
||||
text = text.replace(/([^\\]|^)\\n/gm, "$1\n");
|
||||
text = text.replace(/\\\\t/gm, "\\t");
|
||||
text = text.replace(/\\\\n/gm, "\\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue