diff options
Diffstat (limited to 'ext/mixed/js')
-rw-r--r-- | ext/mixed/js/japanese.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/mixed/js/japanese.js b/ext/mixed/js/japanese.js index 779e3d35..c11e955b 100644 --- a/ext/mixed/js/japanese.js +++ b/ext/mixed/js/japanese.js @@ -27,5 +27,14 @@ function jpIsKana(c) { } function jpKatakanaToHiragana(text) { - return wanakana._katakanaToHiragana(text); + let result = ''; + for (const c of text) { + if (wanakana.isKatakana(c)) { + result += wanakana.toHiragana(c); + } else { + result += c; + } + } + + return result; } |