feat(blox): support HTML & multiple paragraphs in Markdown blox

This commit is contained in:
George Cushen 2024-05-19 13:07:35 +01:00
commit 55b856df3a

View file

@ -6,7 +6,7 @@
{{ $page := .wcPage }}
{{ $block := .wcBlock }}
{{ $title := $block.content.title | emojify | $page.RenderString }}
{{ $text := $block.content.text | emojify | $page.RenderString }}
{{ $text := $block.content.text | emojify | $page.RenderString | safeHTML }}
<div class="flex flex-col items-center max-w-prose mx-auto gap-3 justify-center">
@ -14,5 +14,6 @@
{{ $title }}
</div>
{{ with $text }}<p class="prose prose-slate lg:prose-xl dark:prose-invert max-w-prose">{{ . }}</p>{{ end }}
{{/* We use DIV rather than P to support `prose` class and multiple paragraphs */}}
{{ with $text }}<div class="prose prose-slate lg:prose-xl dark:prose-invert max-w-prose">{{ . }}</div>{{ end }}
</div>