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

classDiagram breaks on any edit #858

Closed
kitsu opened this issue Jun 13, 2019 · 8 comments
Closed

classDiagram breaks on any edit #858

kitsu opened this issue Jun 13, 2019 · 8 comments

Comments

@kitsu
Copy link

kitsu commented Jun 13, 2019

I am using Mermaid via VSCode-Markdown-Preview-Enhanced, and I noticed today that my classDiagrams are broken. I figured it was their problem, but testing on the Mermaid Live Editor I have similar problems.

In the editor paste any simple class diagram (e.g. the ReadMe example) and it will probably render fine, but preform any edit and the graph becomes unrecoverable broken.

The most common error I'm getting is TypeError: Cannot read property 'x' of undefined, but in the Live Editor I'm also getting s.node(...) is undefined.

I'm pushing my coworkers to use Markdown for internal documentation, and the classDiagram has been really handy. I hope someone is maintaining it now (it was abandoned last time I checked).

@knsv
Copy link
Collaborator

knsv commented Jun 15, 2019

Could you provide a sample diagram that breaks?

@DanShai
Copy link
Contributor

DanShai commented Jun 15, 2019

Hi @kitsu ,
try using the fix and see if it solved your problem.

@rajasekaran2003
Copy link

Is there a fix for this issue?

@rajasekaran2003
Copy link

@knsv
classDiagram
Class01 <|-- AveryLongClass : Cool
Class03 -- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --
C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
Class09-->Class20: what

https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiY2xhc3NEaWFncmFtXG5DbGFzczAxIDx8LS0gQXZlcnlMb25nQ2xhc3MgOiBDb29sXG5DbGFzczAzICotLSBDbGFzczA0XG5DbGFzczA1IG8tLSBDbGFzczA2XG5DbGFzczA3IC4uIENsYXNzMDhcbkNsYXNzMDkgLS0-IEMyIDogV2hlcmUgYW0gaT9cbkNsYXNzMDkgLS0qIEMzXG5DbGFzczA5IC0tfD4gQ2xhc3MwN1xuQ2xhc3MwNyA6IGVxdWFscygpXG5DbGFzczA3IDogT2JqZWN0W10gZWxlbWVudERhdGFcbkNsYXNzMDEgOiBzaXplKClcbkNsYXNzMDEgOiBpbnQgY2hpbXBcbkNsYXNzMDEgOiBpbnQgZ29yaWxsYVxuQ2xhc3MwOCA8LS0-IEMyOiBDb29sIGxhYmVsXG5DbGFzczA5LS0-Q2xhc3MyMDogd2hhdCIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In19

it renders fine the first time. just edit something and it would break with the error mentioned above.

@rajasekaran2003
Copy link

If the fix is what DanShai has merged recently, when will it be released to cdnjs/unpkg?

@knsv
Copy link
Collaborator

knsv commented Jun 24, 2019

The issue is fixed and I am planning a release the coming days, rc-9

@rajasekaran2003
Copy link

rajasekaran2003 commented Jun 24, 2019 via email

@knsv
Copy link
Collaborator

knsv commented Jun 25, 2019

The fix for this was included in release 8.1.0. I am closing this for now. Reopen if there still is a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants