fix glossary lists with one item

This commit is contained in:
Alex Yatskov 2016-12-28 19:28:59 -08:00
parent ef24b4f236
commit 37d61b35d0
2 changed files with 14 additions and 6 deletions

View File

@ -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':

View File

@ -114,7 +114,9 @@ body {
}
.term-glossary li span {
color: #000;
color: #000;
overflow-x: auto;
white-space: pre;
}
.term-glossary p {
@ -156,7 +158,9 @@ body {
}
.kanji-glossary li span {
color: #000;
color: #000;
overflow-x: auto;
white-space: pre;
}
.kanji-glossary p {