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
73.03k stars 6.68k forks source link

Syntax error when using non-alphanumeric in architecture node label #6056

Open mgrubb opened 3 weeks ago

mgrubb commented 3 weeks ago

Description

When using anything outside of [a-zA-Z0-9_ ] a syntax error is thrown. This doesn't work:

architecture-beta
    group agroup(cloud)[Cloud-Name]

This does:

architecture-beta
    group agroup(cloud)[Cloud_Name]

Steps to reproduce

  1. Create mermaid architecture diagram
  2. Use a label that contains a - character
  3. Observe syntax error

Screenshots

image

Code Sample

See above

Setup

Suggested Solutions

Additional Context

No response

Lockszmith-GH commented 2 weeks ago

I'll add, that this doesn't work even when surrounding the text with quotes, which is what works in flowchart.