dotnet / interactive

.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.
MIT License
2.8k stars 371 forks source link

More than one Mermaid Diagram does not render properly on Export to HTML or PDF #3561

Open drewsteinacher opened 1 month ago

drewsteinacher commented 1 month ago

Describe the bug

When exporting an .ipynb to HTML or PDF with multiple Mermaid cells, only one appears to render properly, and the remainder appear as generic error messages like "Syntax error in text mermaid version 10.6.1": image

For example, use this mermaid code in two cells in a .ipynb notebook:

sequenceDiagram
      Alice->>John: Hello John
      John-->>Alice: Great day!

image

You may need to have the following set up to get to the Export button: image

  1. A Python environment installed with nbconvert installed (you may need to run pip install nbconvert as mentioned here).
  2. The Python VSCode extension installed and configured to the correct environment.

Some other related information:

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

Screenshots

If applicable, add screenshots to help explain your problem.