culinary.kemonine.info/themes/hugo-theme-relearn/layouts/partials/shortcodes/mermaid.html
2022-12-03 10:27:03 -05:00

9 lines
302 B
HTML

{{- $context := .context }}
{{- $content := .content }}
{{- $align := .align | default "center" }}
{{- with $context }}
<div class="mermaid align-{{ $align }}">
{{- replaceRE "&#39;" "'" ( replaceRE "&#34;" "\"" ( $content | safeHTML ) ) -}}
</div>
{{- .Page.Store.Set "hasMermaid" true }}
{{- end }}