aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-04-13 20:32:24 -0400
committerGitHub <noreply@github.com>2021-04-13 20:32:24 -0400
commit609d4fe3347f87290a428e2ba1192acb991b2e38 (patch)
tree57a37b970bc5564ab7a958aa695b5351aecdb793 /ext/js/display
parentbbf47865ffa616128543396c97aa861d8a423a36 (diff)
Replace furigana with reading (#1614)
* Use "reading" instead of "furigana" for reading distribution * Update tests
Diffstat (limited to 'ext/js/display')
-rw-r--r--ext/js/display/display-generator.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js
index 61c93b4a..9a90502e 100644
--- a/ext/js/display/display-generator.js
+++ b/ext/js/display/display-generator.js
@@ -715,13 +715,13 @@ class DisplayGenerator {
_appendFurigana(container, term, reading, addText) {
container.lang = 'ja';
const segments = this._japaneseUtil.distributeFurigana(term, reading);
- for (const {text, furigana} of segments) {
- if (furigana) {
+ for (const {text, reading: reading2} of segments) {
+ if (reading2) {
const ruby = document.createElement('ruby');
const rt = document.createElement('rt');
addText(ruby, text);
ruby.appendChild(rt);
- rt.appendChild(document.createTextNode(furigana));
+ rt.appendChild(document.createTextNode(reading2));
container.appendChild(ruby);
} else {
addText(container, text);