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

Class Diagram Issues when using Mermaid in Stackedit #748

Closed
3 tasks done
monsterkrampe opened this issue Oct 25, 2018 · 3 comments · Fixed by #832
Closed
3 tasks done

Class Diagram Issues when using Mermaid in Stackedit #748

monsterkrampe opened this issue Oct 25, 2018 · 3 comments · Fixed by #832

Comments

@monsterkrampe
Copy link
Contributor

monsterkrampe commented Oct 25, 2018

I was currently trying out https://stackedit.io/ and wanted to create some class diagrams using mermaid, which could look like this:

```mermaid
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
```

The first issue is, that the grammar of the class Diagram does currently not allow a line break at the end of the statements, so the above code block will not work.

The next thing I noticed after working around the first problem was, that the diagram was only rendered the first time. Each time after that cannot read property x of undefined occurred.

Another thing I wanted to try was to add a Class without a relation as described in #609.

In summary there are the following tasks:

Note that these issues can be easily reproduced in the Live Editor

I started working at those and I am about to submit a Pull Request.

monsterkrampe added a commit to monsterkrampe/mermaid that referenced this issue Oct 25, 2018
…rerender correctly; allow unassociated classes
@bendem
Copy link

bendem commented May 17, 2019

This, I'm unsure how to go about using mermaidjs to draw class diagrams since you can't write a markdown code block that doesn't end with a new line. Was there any work on this?

@monsterkrampe
Copy link
Contributor Author

Hi @bendem.
There was some work on this and I already submitted a PR quite some time ago as you can see.
This should fix the 3 problems mentioned here, but sadly no one merged or even reviewed it.
Maybe it's because not all the checks passed but the only one failing is code climate as it marks export statements from different files as duplicates, which have nothing to do with each other.

I did not receive any human feedback on this until now, so I don't know if this will ever be merged.

@monsterkrampe
Copy link
Contributor Author

My PR got merged 🎉
This Issue should be fixed.

Fell free to leave feedback if something still does not work for you for some reason.

mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
Bumps node from 17.8.0 to 17.9.0.

---
updated-dependencies:
- dependency-name: node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

Successfully merging a pull request may close this issue.

2 participants