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

Parsing flowchart subgraph with external link is broken #5206

Open
d33bs opened this issue Jan 17, 2024 · 4 comments
Open

Parsing flowchart subgraph with external link is broken #5206

d33bs opened this issue Jan 17, 2024 · 4 comments
Labels
Contributor needed Graph: Flow Status: Approved Is ready to be worked on Type: Bug / Error Something isn't working or is incorrect

Comments

@d33bs
Copy link

d33bs commented Jan 17, 2024

Description

Thank you for the great work on this project - it's fantastic to use! I noticed that when using flowcharts and specific nesting of nodes, specifically with a node id of manager (but also perhaps others) that a syntax error occurs. I imagine but don't know for sure whether this occurs due to the use of reserved keywords. In the example below, if I remove the id manager and change this to seemingly anything else, for example, mermaid, the syntax error no longer occurs.

Steps to reproduce

See the following mermaid.live link or use the following to reproduce this error.

flowchart LR

  memory
  code
  subgraph interpreter
    subgraph manager
        broken
    end
  end

code --> interpreter
manager <--> memory

Screenshots

image

Code Sample

See above.

Setup

  • Mermaid version: 10.6.1
  • Browser and Version: Chrome

Suggested Solutions

  • Perhaps this is due to certain sequences of reserved keywords (I'm unsure). If this is the case, perhaps a page within the documentation outlining what is reserved or not might be helpful (if this doesn't already exist!).

Additional Context

Thanks again for any help you can provide!

@d33bs d33bs added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Jan 17, 2024
@sidharthv96
Copy link
Member

This is not a case of reserved keywords (if you change manager to something else in both places, it still breaks).
It's a bug with subgraphs that have external links.

@sidharthv96 sidharthv96 changed the title Parsing flowchart subgraph node id manager in specific contexts results in syntax error Parsing flowchart subgraph with external link is broken Jan 18, 2024
@d33bs
Copy link
Author

d33bs commented Jan 18, 2024

Thank you for the reply and clarification @sidharthv96 !

@sidharthv96 sidharthv96 added Contributor needed Status: Approved Is ready to be worked on Graph: Flow and removed Status: Triage Needs to be verified, categorized, etc labels Jan 18, 2024
@mathbraga
Copy link
Contributor

mathbraga commented Jan 18, 2024

Hi I believe this has been fixed by #5127, it is still awaiting review but if you go over there and paste the flowchart code from this issue into the deploy preview it should work.

@medliii
Copy link

medliii commented Feb 23, 2024

version 10.8 works.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contributor needed Graph: Flow Status: Approved Is ready to be worked on Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

4 participants