diff --git a/ext/js/language/zh/chinese.js b/ext/js/language/zh/chinese.js index 3072d200f9..a17a82d1a6 100644 --- a/ext/js/language/zh/chinese.js +++ b/ext/js/language/zh/chinese.js @@ -63,5 +63,5 @@ export function isStringPartiallyChinese(str) { /** @type {import('language').ReadingNormalizer} */ export function normalizePinyin(str) { - return str.normalize('NFC').toLowerCase().replace(/[\s・:]/g, ''); + return str.normalize('NFC').toLowerCase().replace(/[\s・:]|\/\//g, ''); } diff --git a/test/language/chinese-reading-normalizer.test.js b/test/language/chinese-reading-normalizer.test.js index 398ef0c91d..12eb47e6dc 100644 --- a/test/language/chinese-reading-normalizer.test.js +++ b/test/language/chinese-reading-normalizer.test.js @@ -24,6 +24,7 @@ const tests = [ ['Wéi jī Bǎi kē', 'wéijībǎikē'], ['wán:zhěng', 'wánzhěng'], ['fān・yì', 'fānyì'], + ['fān//yì', 'fānyì'], ]; describe('Normalize Pinyin', () => {