-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Mermaid.js state diagrams do not always render in Windows #15660
Comments
Thanks for the screenshots, but can you post a gist of an |
Let me know if this is exactly what you requested: |
The only quick hit I found was likely an upstream mermaid/browser bug: the As for the rest: it looks like there's trailing junk after some of the diagram closing fences: ```mermaid # yep this is right
```[End] # this is busted
```er! # this is busted
```sh --> [*] # this is busted The markdown "spec" is pretty gnarly, but I don't believe I've seen any implementation that had "afterfence" operators. |
Humm, I just copied those from the mermaid site (the little copy button in the top right of the examples) and placed the
around them, I will continue to play with other examples. as far as the closing junk - yes it looks like some other stuff crept in there, when I go into the cell then shift enter it is somehow getting updated/changed - very curious. I assume that is my fault so I will continue to experiment. |
Here is that one reworked. the second one is the same thing, but first pasted into a plain text editor, then copied and pasted into jupyterlab. Here is the gist: |
In that gist, it looks like ```mermaid
flowchart LR
chicken --> egg
```
Some of the other cells also leave out the closing "fencepost"... but have nothing after them. From the GitHub-flavored markdown spec:
|
Ah, looking more closely at the encoded file, you may very well be getting bitten by #14715, where windows line endings ( |
@bollwyvl , I think you are right. At work my desktop has to be windows so that is what I was trying this on. |
Yeah, windows support is kind of an on-going struggle, and probably out of scope for that (mostly still) little PR. However, this issue did highlight some of the pitfalls of the |
…mermaid-newlines
…mermaid-newlines
…nes' into jupyterlabgh-15660-mermaid-newlines
This has been resolved in JupyterLab 4.1.2 |
I have had some mermaid diagrams work, but many don't.
I setup a new environment to test the beta:
I was working through some examples on https://mermaid.js.org/ and noticed a lot of them don't work in jupyterlab.
Example 1
On this page:
https://mermaid.js.org/syntax/stateDiagram.html
This is what that site shows:
Here is the code:
Here is what jupyterlab renders:
Example 2
On this page:
https://mermaid.js.org/syntax/classDiagram.html
I see this:
Here is the code:
This is what jupyterlab renders:
Example 3
On this page:
https://mermaid.js.org/syntax/sequenceDiagram.html
I see this:
Here is the code:
This is what jupyterlab renders:
The text was updated successfully, but these errors were encountered: