MSzturc / obsidian-advanced-slides

Create markdown-based reveal.js presentations in Obsidian
https://mszturc.github.io/obsidian-advanced-slides/
MIT License
948 stars 80 forks source link

Mermaid js graph with subgraph not rendering #219

Open natsen opened 1 year ago

natsen commented 1 year ago

Describe the bug graph with subgraph does fail to render with error 'Cannot set properties of undefined (setting 'rank')'

Samples to Reproduce

graph TD
    A[Christmas] -->|Get money| B(Go shopping)
    B --> C{Let me think}
    C -->|One| D[Laptop]
    C -->|Two| E[iPhone]
    C -->|Three| F[fa:fa-car Car]
    subgraph subg
    AA
    BB
    end
  A-->subg

Expected behavior Render successfully in the slide similar to the rendering in obsidian

Solution this is a mermai-js issue that is fixed in the version 9.3.0. obsidian advanced slides need to use 1.1.0 of reveal.js-mermaid-plugin to pickup this fix.