fix glossary lists with one item
This commit is contained in:
parent
ef24b4f236
commit
37d61b35d0
@ -161,11 +161,15 @@ class Yomichan {
|
|||||||
break;
|
break;
|
||||||
case 'glossary-list':
|
case 'glossary-list':
|
||||||
if (definition.glossary) {
|
if (definition.glossary) {
|
||||||
value = '<ol style="text-align: left;">';
|
if (definition.glossary.length > 1) {
|
||||||
for (const gloss of definition.glossary) {
|
value = '<ol style="white-space: pre; text-align: left;">';
|
||||||
value += `<li>${gloss}</li>`;
|
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;
|
break;
|
||||||
case 'tags':
|
case 'tags':
|
||||||
|
@ -114,7 +114,9 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.term-glossary li span {
|
.term-glossary li span {
|
||||||
color: #000;
|
color: #000;
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: pre;
|
||||||
}
|
}
|
||||||
|
|
||||||
.term-glossary p {
|
.term-glossary p {
|
||||||
@ -156,7 +158,9 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.kanji-glossary li span {
|
.kanji-glossary li span {
|
||||||
color: #000;
|
color: #000;
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: pre;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kanji-glossary p {
|
.kanji-glossary p {
|
||||||
|
Loading…
Reference in New Issue
Block a user