improved custom text preprocessing to remove new line, tab characters and double spaces

This commit is contained in:
Jack 2020-05-19 04:03:43 +01:00
parent 801d0358b5
commit f76551f629

View file

@ -612,6 +612,8 @@ function focusWords() {
function changeCustomText() {
customText = prompt("Custom text");
customText = customText.replace(/[\n\r\t ]/gm, ' ');
customText = customText.replace(/ +/gm, ' ');
initWords();
}