소스 검색

feat: more unicode variants

Sv443 2 년 전
부모
커밋
6fdbbb1827
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/constants.ts

+ 3 - 2
src/constants.ts

@@ -4,9 +4,10 @@ export const langCodes = new Set<string>(["aa","ab","ae","af","ak","am","an","ar
 /** Map of regex and replacement char to normalize fields before fuzzy filtering them */
 export const charReplacements = new Map<RegExp, string>([
     ["`´’︐︑ʻ", "'"],
-    [",", ","],
-    ["—─", "-"],
     ["“”", "\""],
+    [",", ","],
+    ["—─ ", "-"],
+    ["    ", " "],
 ].map(
     ([k, v]) => ([new RegExp(`[${k!}]`, "g"), v!])
 ));