2021-06-30 20:32:28 +02:00
|
|
|
{{ if .Site.Params.options.mermaid -}}
|
|
|
|
<div class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
|
|
|
{{ $data := replaceRE "(^\\s+```)" "" .Inner -}}
|
|
|
|
{{ replaceRE "(```\\s+$)" "" $data -}}
|
|
|
|
</div>
|
2021-07-01 16:21:03 +02:00
|
|
|
{{ else -}}
|
2021-07-02 09:07:05 +02:00
|
|
|
{{ errorf "Failed to process mermaid shortcode(s). Set `mermaid = true` in `./config/_default/params.toml`." }}
|
2021-07-01 16:21:03 +02:00
|
|
|
{{ end -}}
|