fix: ignore apostrophes in practice answers

This commit is contained in:
TTlaji committed 2026-06-08 15:19:05 +08:00
1 parent a6ac042e83
commit d78ddc7e00
2 files changed
+10 -3

No files matched your search

+2 -2
View File
@@ -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();
}