quarto-dev / quarto

Quarto open-source scientific and technical publishing system
https://quarto.org
GNU Affero General Public License v3.0
341 stars 28 forks source link

Update to mermaid-js 9.3 #67

Closed jmcastagnetto closed 1 year ago

jmcastagnetto commented 1 year ago

The new version (https://github.com/mermaid-js/mermaid/releases/tag/v9.3.0) has a reduced size, and several updates to the available language, including support to, for example, titles in a YAML block. The latter breaks the quarto preview in (at least) VSCode as seen below.

Error when previewing mermaid diagram (VSCODE)

The diagram

---
title: Function execution process
---

stateDiagram-v2
    [*] --> Cool
    Cool --> Cool2
    Cool2 --> API1
    Cool2 --> API2
    API2 --> Cool2
    Cool2 --> API3
    Cool2 --> [*]

Seems to work OK with github rendering an also when using the CLI version of mermaid:

$ mmdc -o overall-process.png -i overall-process.mmd 
Generating single mermaid chart

overall-process.png

jjallaire commented 1 year ago

Thanks for reporting this! Addressed here: https://github.com/quarto-dev/quarto/commit/9a794e89f1f74d4f830148880d19ffabadfbf95c