From 3a7cee9f737c9a01cd23f734089df41aacd276bb Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 6 Mar 2021 15:49:07 -0500 Subject: Fix furigana distribution when reading starts with expression, but has remainder characters (#1496) --- ext/js/language/japanese-util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/js/language') diff --git a/ext/js/language/japanese-util.js b/ext/js/language/japanese-util.js index 4d317396..861d66e8 100644 --- a/ext/js/language/japanese-util.js +++ b/ext/js/language/japanese-util.js @@ -531,7 +531,7 @@ const JapaneseUtil = (() => { _segmentizeFurigana(reading, readingNormalized, groups, groupsStart) { const groupCount = groups.length - groupsStart; if (groupCount <= 0) { - return []; + return reading.length === 0 ? [] : null; } const group = groups[groupsStart]; -- cgit v1.2.3