hugo-theme-relearn/layouts/partials/shortcodes/mermaid.html
Sören Weber 9a6e8edacc
mermaid: remove W3C validator errors #337
remove old-styled alignment
2022-10-07 20:25:44 +02:00

9 lines
No EOL
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 }}