aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-08-14 23:10:59 -0700
committerAlex Yatskov <alex@foosoft.net>2017-08-14 23:10:59 -0700
commit61dde5b3b74030d7b01c195751a54e9dcacdb6bb (patch)
tree04574d171531ece7f1e6d80ac2e816dd52e0d773 /ext/mixed/js
parentc9623276e1dfdf6014d2bf791180e88e8df500dd (diff)
upgrade to wanikana 2.2.3 (fixes #42)
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/japanese.js11
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;
}