{{- $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 }}