fix: ignore apostrophes in practice answers
This commit is contained in:
1 parent
a6ac042e83
commit
d78ddc7e00
2 files changed
+10
-3
No files matched your search
@@ -801,10 +801,10 @@ const practiceModeLabels = {
|
||||
function normalizePracticeAnswer(text) {
|
||||
return String(text || "")
|
||||
.toLowerCase()
|
||||
.replace(/[’‘]/g, "'")
|
||||
.replace(/['’‘]/g, "")
|
||||
.replace(/[“”]/g, "\"")
|
||||
.replace(/[-–—]+/g, " ")
|
||||
.replace(/[.,!?;:"()[\]{},。!?;:“”‘’、]/g, " ")
|
||||
.replace(/[.,!?;:"()[\]{},。!?;:“”、]/g, " ")
|
||||
.replace(/\s+/g, " ")
|
||||
.trim();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user