From 86d96a903696db98c0680d7665c53da5cd80731f Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 22 Dec 2019 18:26:27 -0500 Subject: Update detection of Japanese characters --- ext/mixed/js/japanese.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ext/mixed') diff --git a/ext/mixed/js/japanese.js b/ext/mixed/js/japanese.js index 44db4b8c..8d69c180 100644 --- a/ext/mixed/js/japanese.js +++ b/ext/mixed/js/japanese.js @@ -92,9 +92,13 @@ function jpIsKana(c) { ); } -function jpIsJapaneseText(text) { +function jpIsCharacterJapanese(c) { + return jpIsKanji(c) || jpIsKana(c); +} + +function jpIsAnyCharacterJapanese(text) { for (const c of text) { - if (jpIsKanji(c) || jpIsKana(c)) { + if (jpIsCharacterJapanese(c)) { return true; } } -- cgit v1.2.3