diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/mixed/js/japanese.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/mixed/js/japanese.js b/ext/mixed/js/japanese.js index 25f0608e..8dd5651c 100644 --- a/ext/mixed/js/japanese.js +++ b/ext/mixed/js/japanese.js @@ -17,7 +17,7 @@ */ -const jpHalfWidthCharacterMapping = new Map([ +const JP_HALFWIDTH_KATAKANA_MAPPING = new Map([ ['ヲ', 'ヲヺ-'], ['ァ', 'ァ--'], ['ィ', 'ィ--'], @@ -76,6 +76,7 @@ const jpHalfWidthCharacterMapping = new Map([ ['ン', 'ン--'] ]); + function jpIsKanji(c) { const code = c.charCodeAt(0); return ( @@ -267,7 +268,7 @@ function jpConvertHalfWidthKanaToFullWidth(text, sourceMapping) { for (let i = 0; i < ii; ++i) { const c = text[i]; - const mapping = jpHalfWidthCharacterMapping.get(c); + const mapping = JP_HALFWIDTH_KATAKANA_MAPPING.get(c); if (typeof mapping !== 'string') { result += c; continue; |