Skip to content

Mermaid not working with pandoc #7

@cfclrk

Description

@cfclrk

Thanks @andykuszyk for noticing this issue! Continues discussion from #6.

Mermaid diagrams are blank when markdown-xwidget-command is set to "pandoc". When run against example.md, pandoc creates some HTML that looks like this:

<pre class="mermaid"><code>graph LR
  A --&gt; B
  B --&gt; C</code></pre>

This doesn't work with mermaid, because the class attribute needs to be on the element that directly contains the graph (so on the <code> block).

In contrast, multimarkdown creates HTML like this, which does work with mermaid:

<pre><code class="mermaid">graph LR
  A --&gt; B
  B --&gt; C
</code></pre>

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