diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-08-14 23:10:59 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-08-14 23:10:59 -0700 |
commit | 61dde5b3b74030d7b01c195751a54e9dcacdb6bb (patch) | |
tree | 04574d171531ece7f1e6d80ac2e816dd52e0d773 /ext/mixed/js/japanese.js | |
parent | c9623276e1dfdf6014d2bf791180e88e8df500dd (diff) |
upgrade to wanikana 2.2.3 (fixes #42)
Diffstat (limited to 'ext/mixed/js/japanese.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; } |