This commit is contained in:
yoannchb-pro
2023-06-12 23:13:47 -04:00
parent 7af54c40ad
commit 0458137f0c
7 changed files with 10 additions and 5 deletions
+2 -2
View File
@@ -4,8 +4,8 @@
*/
function normalizeText(text: string) {
return text
.replace(/\n+/g, "\n")
.replace(/[ \t]+/g, " ")
.replace(/(\n\s*)+/gi, "\n")
.replace(/[ \t]+/gi, " ")
.toLowerCase()
.trim()
.replace(/^[a-z\d]\.\s/gi, "") //a. text, b. text, c. text, 1. text, 2. text, 3.text