mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-26 00:37:37 +08:00
improved custom text preprocessing to remove new line, tab characters and double spaces
This commit is contained in:
parent
06c2ce1bd5
commit
70433ce982
1 changed files with 2 additions and 0 deletions
|
|
@ -612,6 +612,8 @@ function focusWords() {
|
|||
|
||||
function changeCustomText() {
|
||||
customText = prompt("Custom text");
|
||||
customText = customText.replace(/[\n\r\t ]/gm, ' ');
|
||||
customText = customText.replace(/ +/gm, ' ');
|
||||
initWords();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue