feat: Add styling to ignored notes & honor newlines

This commit is contained in:
Dendy 2025-09-08 10:18:26 +02:00
parent f5a65fbe05
commit 3f1ac9c2a0
2 changed files with 5 additions and 2 deletions

View File

@ -46,8 +46,9 @@ class KanjiController extends AbstractController
)); ));
while (($explanation = fgets($file)) !== false) { while (($explanation = fgets($file)) !== false) {
if ($explanation === "\n") continue 2; if ($explanation === "\n") continue 2;
$ret[$kanji] .= mb_trim($explanation); $ret[$kanji] .= $explanation;
} }
$ret[$kanji] = mb_rtrim($ret[$kanji]);
} }
return $ret; return $ret;

View File

@ -95,8 +95,10 @@
{% if ignored_text is not null %} {% if ignored_text is not null %}
<hr> <hr>
<div class="alert alert-info">
<h2>Ignored</h2 > <h2>Ignored</h2 >
<div>{{ ignored_text }}</div> <div>{{ ignored_text|nl2br }}</div>
</div>
{% endif %} {% endif %}
<hr> <hr>