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

Unable to render a graph if the node contains the word graph in it. #5276

Closed
bnzone opened this issue Feb 8, 2024 · 3 comments
Closed

Unable to render a graph if the node contains the word graph in it. #5276

bnzone opened this issue Feb 8, 2024 · 3 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@bnzone
Copy link

bnzone commented Feb 8, 2024

Description

I came across the situation where it won't be able to render the graph in certain situations if I have the word graph in it.
Is that a reserved keyword? When I capitalize it, the graph renders fine.

I've provided an example below.

Steps to reproduce

The code snippets below will not throw an error:

graph TD;
A-->B;
A-->C;
B-->D;
C-->graph1;
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C--> graph1;
Loading

graph TD;
    A-->B;
    A-->C;
    B-->D;
    C--> GRAPH;
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->GRAPH;
Loading

The code below will throw an error:

graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->my-graph;
Loading

Screenshots

No response

Code Sample

graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->my-graph;

Setup

  • Mermaid version:
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

No response

Additional Context

No response

@bnzone bnzone added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Feb 8, 2024
@c032
Copy link

c032 commented Feb 13, 2024

This sounds like the problem described in the PR #4657, released (fixed) in v10.3.1.

@FutzMonitor
Copy link
Contributor

I can confirm with the current live editor v.10.8.0 that this bug isn't present. So, it seems this issue can be closed unless it's occurring on another platform.

image

@bnzone
Copy link
Author

bnzone commented Feb 22, 2024

@FutzMonitor Thank you for taking the time to test it.
So, I guess, it seems that Github is using an older version in the editor which still contains this bug.

graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->my-graph;
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants