upgrade to wanikana 2.2.3 (fixes #42)

This commit is contained in:
Alex Yatskov 2017-08-14 23:10:59 -07:00
parent c9623276e1
commit 61dde5b3b7
2 changed files with 11 additions and 2 deletions

View File

@ -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;
}

File diff suppressed because one or more lines are too long