diff --git a/lib/Config.rakumod b/lib/Config.rakumod index dafed14..1c63d24 100644 --- a/lib/Config.rakumod +++ b/lib/Config.rakumod @@ -10,6 +10,14 @@ use DB::Post; unit class Config; +sub show-html($html) { + my $out = "$html"; + # Work around HTML::Functional automatically putting newlines between tags + $out ~~ s:g/'' \v+ ''/<\/i>/; + $out ~~ s:g/\v+ ''/<\/a>/; + $out +} + # TODO: Support GFM admonitions method generate-post(Int:D $id, Post:D $post, $db) { my $meta = $db.meta; @@ -34,7 +42,7 @@ method generate-post(Int:D $id, Post:D $post, $db) { $body ]; - "$html" + show-html $html } method generate-blurb(Int:D $id, $db) { @@ -81,7 +89,7 @@ method generate-index($db) { $body ]; - "$html" + show-html $html } method generate-archive($db) { @@ -106,7 +114,7 @@ method generate-archive($db) { $body ]; - "$html" + show-html $html } method generate-tag-blurb($db, $tag, $limit?) { @@ -164,7 +172,7 @@ method generate-tags-page($db, @tags) { $body ]; - "$html" + show-html $html } method generate-tag-page($db, $tag) { @@ -180,5 +188,5 @@ method generate-tag-page($db, $tag) { $body ]; - "$html" + show-html $html } diff --git a/lib/Render/Post.rakumod b/lib/Render/Post.rakumod index 637217f..1724c74 100644 --- a/lib/Render/Post.rakumod +++ b/lib/Render/Post.rakumod @@ -63,7 +63,7 @@ sub post-tag(Str:D $tag) is export { span :class, [ a :href("/tags/$tag.html"), [ icon 'hash'; - $tag; + span $tag; ] ] } diff --git a/resources/main.css b/resources/main.css index 87dc6ac..36a1245 100644 --- a/resources/main.css +++ b/resources/main.css @@ -65,10 +65,10 @@ body, .post { flex-wrap: wrap; margin-top: var(--box-margin-vert); } -.header-links > a > span, .post-series-tag > a > span { +.header-links > a > span, .post-series-tag > a > span, .post-tag > a > span { text-decoration: underline; } -.header-links > a, .post-series-tag > a { +.header-links > a, .post-series-tag > a, .post-tag > a { text-decoration: none; }