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

nbdev_preview Mermaid doesn't work #804

Closed
benoit-cty opened this issue Aug 8, 2022 · 1 comment · Fixed by #827
Closed

nbdev_preview Mermaid doesn't work #804

benoit-cty opened this issue Aug 8, 2022 · 1 comment · Fixed by #827
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@benoit-cty
Copy link
Contributor

benoit-cty commented Aug 8, 2022

I was exited by https://quarto.org/docs/authoring/diagrams.html

Graphviz plot work with NBDev, but not Mermaid plot.

How to reproduce

copy-paste the sample from Quarto in a fresh nbdev v2 project:

'''{mermaid}
flowchart LR
  A[Hard edge] --> B(Round edge)
  B --> C{Decision}
  C --> D[Result one]
  C --> E[Result two]
'''

(replace quote by back-quote)

Run nbdev_preview

Expected result

The page display the plot.

Actual result

The page display the code of the plot.

There is an error in the browser console:

Uncaught ReferenceError: mermaid is not defined
    <anonymous> http://localhost:3000/site_libs/quarto-diagram/mermaid-init.js:21

But I could see the library http://localhost:3000/site_libs/quarto-diagram/mermaid.min.js is loaded.

Versions used

nbdev: 2.1.1
Quarto 1.0.37

@hamelsmu hamelsmu self-assigned this Aug 10, 2022
@jph00 jph00 added the bug Something isn't working label Aug 10, 2022
hamelsmu added a commit that referenced this issue Aug 10, 2022
@hamelsmu hamelsmu added documentation Improvements or additions to documentation and removed bug Something isn't working labels Aug 10, 2022
@hamelsmu
Copy link
Member

Thanks for reporting this. I've tested this and it works with the current version of Quarto. Can you try upgrading?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants