diff options
| author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-12-22 18:26:27 -0500 | 
|---|---|---|
| committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-01-24 20:15:25 -0500 | 
| commit | 86d96a903696db98c0680d7665c53da5cd80731f (patch) | |
| tree | fb0927ed656715979ddc2d445e45bd022808828c /ext/mixed/js | |
| parent | be2e6e0d9361e844c39bb3e48a3777db0ef52f67 (diff) | |
Update detection of Japanese characters
Diffstat (limited to 'ext/mixed/js')
| -rw-r--r-- | ext/mixed/js/japanese.js | 8 | 
1 files changed, 6 insertions, 2 deletions
| 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;          }      } |