Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mermaid not working with pandoc #7

Open
cfclrk opened this issue Oct 31, 2022 · 0 comments
Open

Mermaid not working with pandoc #7

cfclrk opened this issue Oct 31, 2022 · 0 comments

Comments

@cfclrk
Copy link
Owner

cfclrk commented Oct 31, 2022

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant