aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/japanese.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-11 15:43:12 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-11 15:43:12 -0400
commit90392ac9d6d3b54f811e3d056043a1ffe26fa963 (patch)
tree7c8a885c6239d3adab84e344f8a370eca7bbd069 /ext/bg/js/japanese.js
parentfb87b1ad69b37e75d1e2e46c91235aa6b44c2980 (diff)
Add support for collapsing the Katakana-Hiragana Prolonged Sound Mark
Diffstat (limited to 'ext/bg/js/japanese.js')
-rw-r--r--ext/bg/js/japanese.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/bg/js/japanese.js b/ext/bg/js/japanese.js
index 71fbebb5..78f5b48f 100644
--- a/ext/bg/js/japanese.js
+++ b/ext/bg/js/japanese.js
@@ -85,6 +85,7 @@
const HIRAGANA_SMALL_TSU_CODE_POINT = 0x3063;
const KATAKANA_SMALL_TSU_CODE_POINT = 0x30c3;
+ const KANA_PROLONGED_SOUND_MARK_CODE_POINT = 0x30fc;
// Existing functions
@@ -383,7 +384,11 @@
const hasSourceMap = (sourceMap !== null);
for (const char of text) {
const c = char.codePointAt(0);
- if (c === HIRAGANA_SMALL_TSU_CODE_POINT || c === KATAKANA_SMALL_TSU_CODE_POINT) {
+ if (
+ c === HIRAGANA_SMALL_TSU_CODE_POINT ||
+ c === KATAKANA_SMALL_TSU_CODE_POINT ||
+ c === KANA_PROLONGED_SOUND_MARK_CODE_POINT
+ ) {
if (collapseCodePoint !== c) {
collapseCodePoint = c;
if (!fullCollapse) {