Skip to content

Mermaid diagrams fail to render #1450

@chalin

Description

@chalin

Since the following change has been applied, some previously working Mermaid diagrams report "syntax error":

But nothing has changed in the diagrams and the live Mermaid editor are fine with the Mermaid code.

I believe that the problem stems from the decision to render the code block as a <div> rather than <pre>:

<div class="mermaid">
{{- .Inner | safeHTML }}
</div>

Ok, after some digging, I've found that <pre> is _required, see Requirements for the Mermaid API:

image

References:

/cc @stephanlachnit @deining

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions