Skip to content

Parsing error while using Mermaid diagrams with annotations #154

Open
@plbonneville

Description

@plbonneville

When using Mermaid diagrams with annotations on classes, for example <<interface>>, an error is thrown.

This is due to the fact that the parser is not able to parse the annotation.

classDiagram
class Shape
<<interface>> Shape
Shape : noOfVertices
Shape : draw()
Loading

Removing safeHTML in render-codeblock-mermaid.html fixes the issue.

<div class="mermaid">
    {{- .Inner | safeHTML }}
</div>
{{ .Page.Store.Set "hasMermaid" true }}
<div class="mermaid">
    {{- .Inner }}
</div>
{{ .Page.Store.Set "hasMermaid" true }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions