-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Class diagrams broken with official Mermaid, and shown fine at GitHub. #6075
Comments
If I replace |
However, this minimalistic HTML fails, and I followed official guide found at https://mermaid.js.org/intro/getting-started.html#_4-calling-the-mermaid-javascript-api |
The error is triggered by this bit:
The HTML above is invalid. You can fix it with:
|
Yes, invalid, but GitHub handles that somehow... I tried to remove This is another "workaround" to make it work:
|
Ok, if we open source of this GitHub page, it escapes:
|
This is odd, since this has "always" worked in the past. The "hack" fix of |
This is another "inconvenience": graph TD;
A[Gross Domestic Product (GDP)] --> B[Consumer Spending (C)];
A --> C[Investment (I)];
A --> D[Government Spending (G)];
A --> E[Net Exports (NX)];
E --> F[Exports (X)];
E --> G[Imports (M)];
However, if I wrap graph TD;
A["Gross Domestic Product (GDP)"] --> B["Consumer Spending (C)"];
A --> C["Investment (I)"];
A --> D["Government Spending (G)"];
A --> E["Net Exports (NX)"];
E --> F["Exports (X)"];
E --> G["Imports (M)"];
|
Both flowcharts and class diagrams do not allow spaces in the "id" portion of the definition. If you need to show spaces in the diagram, you can add a label (like you have above). https://mermaid.js.org/syntax/flowchart.html#a-node-with-text |
Thanks for working on it; what is "id portion of definition", can you provide example? With class diagram, if I just replace I believe "id" in |
graph TD;
A["Tuple: {:ok, #34;Success#34;, 200}"]
A --> B[:ok]
A --> C["Success"]
A --> D[200]
Note: quotes in
graph TD;
A["Map: %{#34;name#34; => #34;Alice#34;, #34;age#34; => 30, #34;city#34; => #34;New York#34;}"]
A --> B[#34;name#34; => #34;Alice#34;]
A --> C[#34;age#34; => 30]
A --> D[#34;city#34; => #34;New York#34;]
|
Yes |
Description
This class diagram will be shown fine here at Github, and will fail in minimalistic plain HTML:
Steps to reproduce
This is plain minimalistic HTML. Save it in filesystem and open in the browser: you will see error icon.
Screenshots
No response
Code Sample
No response
Setup
Suggested Solutions
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: