Skip to content

Commit

Permalink
Strip Japanese diacritics (#807)
Browse files Browse the repository at this point in the history
Issue #806
  • Loading branch information
laug authored Oct 31, 2023
1 parent c7e2ea3 commit a943852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/stripDiacritics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default function stripDiacritics(str: string): string {
return (
str
.normalize('NFD')
.replace(/[\u0300-\u036F]/g, '') // Remove combining diacritics
.replace(/[\u0300-\u036F\u3099\u309A]/g, '') // Remove combining diacritics
/* eslint-disable-next-line no-control-regex */
.replace(/[^\u0000-\u007E]/g, (a) => map[a] || a)
);
Expand Down

0 comments on commit a943852

Please sign in to comment.