mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 15:26:15 +08:00
fixed replace only replacing one match
This commit is contained in:
parent
3c182e70d3
commit
88a515cefd
|
@ -997,7 +997,7 @@ export async function init(): Promise<void> {
|
|||
TestWords.setHasTab(true);
|
||||
}
|
||||
|
||||
const te = randomWord.replace("\n", "\n ").trim();
|
||||
const te = randomWord.replace(/\n/g, "\n ").replace(/ $/gm, "");
|
||||
|
||||
if (/ +/.test(te)) {
|
||||
const randomList = te.split(" ");
|
||||
|
|
Loading…
Reference in a new issue