mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
68.63k stars 6.05k forks source link

Inconsistent spacing between attributes and methods in class diagram #5562

Open aubertc opened 3 weeks ago

aubertc commented 3 weeks ago

Description

In the following:

classDiagram
class ClassName {
-attribute : type
- attribute : type

+GetAttribute() type
+ GetAttribute() type
}

the space is preserved between - and attribute, but not between + and GetAttribute:

image

Steps to reproduce

Simply enter the above code in an editor, like https://mermaid.live/edit#pako:eNptzzsOwjAMBuCrWJ5ALRfIhkBiY2HN4jZuGymPKnGGqurdCVAmWCz_nyzZXrGPhlFh7yjnq6UxkdfhneDyqnfyDKsOJxJJtivCoECWmSvBr-nQ3FjOXz8cd2_gL2_YoufkyZp6RF0DoFEm9qxR1dbwQMWJxs8oFYmPJfSoJBVuMcUyTqgGcrmmMhsS3p_YdXsCu55P9A

Screenshots

No response

Code Sample

No response

Setup

Suggested Solutions

No response

Additional Context

No response