summaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/japanese.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/mixed/js/japanese.js b/ext/mixed/js/japanese.js
index ee0ac777..2177ceee 100644
--- a/ext/mixed/js/japanese.js
+++ b/ext/mixed/js/japanese.js
@@ -411,9 +411,9 @@ const jp = (() => {
// Furigana distribution
distributeFurigana(expression, reading) {
- const fallback = [{furigana: reading, text: expression}];
- if (!reading) {
- return fallback;
+ if (!reading || reading === expression) {
+ // Same
+ return [{furigana: '', text: expression}];
}
let isAmbiguous = false;
@@ -471,7 +471,9 @@ const jp = (() => {
if (segments && !isAmbiguous) {
return segments;
}
- return fallback;
+
+ // Fallback
+ return [{furigana: reading, text: expression}];
}
distributeFuriganaInflected(expression, reading, source) {