Skip to content

Commit

Permalink
Update regex pattern for chinese.js
Browse files Browse the repository at this point in the history
Signed-off-by: shiki-tm <[email protected]>
  • Loading branch information
shiki-tm authored Oct 12, 2024
1 parent c63a123 commit 44a4f83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/js/language/zh/chinese.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ export function isCodePointChinese(codePoint) {

/** @type {import('language').ReadingNormalizer} */
export function normalizePinyin(str) {
return str.normalize('NFC').toLowerCase().replace(/[\s:'-]|\/\//g, '');
return str.normalize('NFC').toLowerCase().replace(/(?<=\w)'(?=\w)/g, "\\'");
}

0 comments on commit 44a4f83

Please sign in to comment.