Markdown of mermaid Class Diagram doesn't render properly

Summary

  • Associating a member of a mermaid class using {} (brackets) doesn't render properly and it reverses the order of members.
  • Classes appear unreasonable large.

Steps to reproduce

Add the following code to an issue:

```mermaid

classDiagram
    class ClassA {
        one
        two
        three
    }

    class ClassB

    ClassB: one
    ClassB: two
    ClassB: three
```

Example

This is how the above example renders in this issue:

classDiagram
    class ClassA {
        one
        two
        three
    }

    class ClassB

    ClassB: one
    ClassB: two
    ClassB: three
Expand to see a screenshot made at the time of writing this issue

image

What is the current bug behavior?

  • The indent and rendering of the ClassA members are different than ClassB members.
  • Members of ClassA are in reverse order.
  • Classes are unreasonably large.

What is the expected correct behavior?

  • Both classes should be rendered identically.
  • Members of ClassA should be displayed in the order they are defined.
  • Both Classes should be smaller in appearance.

This is an example form Mermaid Live Editor:

image

Output of checks

This bug happens on GitLab.com

Possible fixes

N/A