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

Mixing subgraph self-reference with references to inner nodes fails to render #2565

Closed
CraigYoung-iress opened this issue Dec 17, 2021 · 3 comments
Labels
Close after 30 days Close issue if no response after 30 days Status: Awaiting Reply Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@CraigYoung-iress
Copy link

Describe the bug
When using subgraphs:
If you mix a self-reference link on the subgraph, with a link to an internal node of the subgraph, the entire graph fails to render.

To Reproduce
This was tested using Mermaidv8.13.5 Live Editor

In the following flowchart definition, 2 lines are commented out.
Uncommenting either renders as expected.
But uncommenting both at the same time fails to render.

flowchart
    subgraph AA
        A1
        A2
    end
    %%EXT --> |Ref to within Subgraph|A1
    %%AA --> |Self-ref Subgraph|AA
Loading

Expected behaviour
The expectation is that in the above flowchart, uncommenting both lines should render correctly.
That is with an arrow from EXT to A1
And and arrow from subgraph AA back to itself.

Screenshots
Not needed, reproducible with the live editor.
(The issue also manifests with VS Code Plugin: Markdown Preview Mermaid Support
v1.13.0)

Code Sample
Provided above.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome Version 96.0.4664.45 (Official Build) (64-bit)
@CraigYoung-iress CraigYoung-iress added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Dec 17, 2021
@SamHasler
Copy link

github is now rendering the graph. What was the graph's code?

@dwhelan
Copy link

dwhelan commented Oct 3, 2022

      flowchart
      subgraph AA
          A1
          A2
      end
      EXT --> |Ref to within Subgraph|A1
      AA --> |Self-ref Subgraph|AA
Loading

Seems to work now. I think this can be closed.

@nirname
Copy link
Contributor

nirname commented Jul 16, 2023

The graph code was

flowchart
    subgraph AA
        A1
        A2
    end
    EXT --> |Ref to within Subgraph|A1
    AA --> |Self-ref Subgraph|AA

@CraigYoung-iress thanks for reaching out. This seems to work now. Let us know if you still facing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close after 30 days Close issue if no response after 30 days Status: Awaiting Reply Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

5 participants