Skip to content

Commit

Permalink
Revise code block render hook for Mermaid diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring authored Nov 23, 2024
1 parent f1da9b6 commit b7716ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content/en/content-management/diagrams.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Hugo does not provide a built-in template for Mermaid diagrams. Create your own

{{< code file=layouts/_default/_markup/render-codeblock-mermaid.html >}}
<pre class="mermaid">
{{- .Inner | safeHTML }}
{{- .Inner | htmlEscape | safeHTML }}
</pre>
{{ .Page.Store.Set "hasMermaid" true }}
{{< /code >}}
Expand Down
2 changes: 1 addition & 1 deletion content/en/render-hooks/code-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ For example, to create a code block render hook to render [Mermaid] diagrams:

{{< code file=layouts/_default/_markup/render-codeblock-mermaid.html copy=true >}}
<pre class="mermaid">
{{- .Inner | safeHTML }}
{{- .Inner | htmlEscape | safeHTML }}
</pre>
{{ .Page.Store.Set "hasMermaid" true }}
{{< /code >}}
Expand Down

0 comments on commit b7716ed

Please sign in to comment.