mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 13:27:49 +08:00
Tried to fix Wikipedia newline issue (#2193) by Estebene
This commit is contained in:
parent
7339213747
commit
f1bcc7b7f6
1 changed files with 5 additions and 0 deletions
|
@ -46,6 +46,11 @@ export async function getSection() {
|
|||
sectionText = sectionText.replace(/\s+/g, " ");
|
||||
sectionText = sectionText.trim();
|
||||
|
||||
// Add spaces
|
||||
sectionText = sectionText.replace(/[a-zA-Z0-9]{3,}\.[a-zA-Z]/g, (x) =>
|
||||
x.replace(/\./, ". ")
|
||||
);
|
||||
|
||||
sectionText.split(" ").forEach((word) => {
|
||||
words.push(word);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue