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

'Graph' keyword in mindmap diagram breaks if elk renderer set for flowchart #5507

Closed
varon opened this issue May 7, 2024 · 2 comments · Fixed by #5579
Closed

'Graph' keyword in mindmap diagram breaks if elk renderer set for flowchart #5507

varon opened this issue May 7, 2024 · 2 comments · Fixed by #5579
Labels
Area: Development Status: Approved Is ready to be worked on Type: Bug / Error Something isn't working or is incorrect

Comments

@varon
Copy link

varon commented May 7, 2024

Description

This error was really incomprehensible to diagnose.

Setting the elk renderer in the mermaid config for flowchart breaks mindmaps escaping somehow.

This works correctly:

%%{init: {'flowchart': {'defaultRenderer': 'elk'}}}%%
 mindmap
   ("single item mindmap")
    ["Descendant node"]

This is broken (note this is ONLY set for flowchart):

%%{init: {'flowchart': {'defaultRenderer': 'elk'}}}%%
 mindmap
   ("single item mindmap")
    ["Descendant node in graph"]

but this works:

 mindmap
   ("single item mindmap")
    ["Descendant node in graph"]

How? why?

Examples on GitHub of broken diagrams

This works - where we don't use the keyword graph inside the string label:

%%{init: {'flowchart': {'defaultRenderer': 'elk'}}}%%
 mindmap
   ("single item mindmap")
    ["Descendant node"]
Loading

This is broken:

%%{init: {'flowchart': {'defaultRenderer': 'elk'}}}%%
 mindmap
   ("single item mindmap")
    ["Descendant node in graph"]
Loading

Setup

  • Mermaid version: 10.9.0
@varon varon added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels May 7, 2024
@varon
Copy link
Author

varon commented May 24, 2024

This is a glaring bug impacting us. Please address or explain what we need to do move forward here.

@nirname
Copy link
Contributor

nirname commented Jun 19, 2024

Thanks for reaching out & sorry for the long response, things are piling up.

Nothing too complex. Because of the wrong detector it thinks that you are trying to invoke flowchart-elk diagram.

But I understand how it looks from the outside.

%%{init: {'flowchart': {'defaultRenderer': 'elk'}}}%%
 mindmap
   ("single item mindmap")
    ["Descendant node in my image"]

That's a bug for sure.

@nirname nirname added Status: Approved Is ready to be worked on Area: Development and removed Status: Triage Needs to be verified, categorized, etc labels Jun 19, 2024
@nirname nirname mentioned this issue Jun 19, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Development Status: Approved Is ready to be worked on Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants