summaryrefslogtreecommitdiff
path: root/ext/bg/js/yomichan.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r--ext/bg/js/yomichan.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index e8956057..6cb7d415 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -161,11 +161,15 @@ class Yomichan {
break;
case 'glossary-list':
if (definition.glossary) {
- value = '<ol style="text-align: left;">';
- for (const gloss of definition.glossary) {
- value += `<li>${gloss}</li>`;
+ if (definition.glossary.length > 1) {
+ value = '<ol style="white-space: pre; text-align: left;">';
+ for (const gloss of definition.glossary) {
+ value += `<li>${gloss}</li>`;
+ }
+ value += '</ol>';
+ } else {
+ value = `<p style="white-space: pre;">${definition.glossary.join('')}</p>`;
}
- value += '</ol>';
}
break;
case 'tags':