mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 13:44:29 +08:00
parsing new line chars for quotes aswell
This commit is contained in:
parent
c0b8f2bd91
commit
ad3fb693af
1 changed files with 4 additions and 0 deletions
|
|
@ -668,6 +668,10 @@ async function initWords() {
|
|||
}
|
||||
randomQuote = rq;
|
||||
randomQuote.text = randomQuote.text.replace(/ +/gm, " ");
|
||||
randomQuote.text = randomQuote.text.replace(/\\\\t/gm, "\t");
|
||||
randomQuote.text = randomQuote.text.replace(/\\\\n/gm, "\n");
|
||||
randomQuote.text = randomQuote.text.replace(/\\t/gm, "\t");
|
||||
randomQuote.text = randomQuote.text.replace(/\\n/gm, "\n");
|
||||
randomQuote.text = randomQuote.text.replace(/( *(\r\n|\r|\n) *)/g, "\n ");
|
||||
let w = randomQuote.text.trim().split(" ");
|
||||
for (let i = 0; i < w.length; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue