Skip to content

Commit a943852

Browse files
authored
Strip Japanese diacritics (#807)
Issue #806
1 parent c7e2ea3 commit a943852

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/stripDiacritics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default function stripDiacritics(str: string): string {
114114
return (
115115
str
116116
.normalize('NFD')
117-
.replace(/[\u0300-\u036F]/g, '') // Remove combining diacritics
117+
.replace(/[\u0300-\u036F\u3099\u309A]/g, '') // Remove combining diacritics
118118
/* eslint-disable-next-line no-control-regex */
119119
.replace(/[^\u0000-\u007E]/g, (a) => map[a] || a)
120120
);

0 commit comments

Comments
 (0)