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

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

Open
mgrubb opened this issue Nov 13, 2024 · 1 comment
Open

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

mgrubb opened this issue Nov 13, 2024 · 1 comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@mgrubb
Copy link

mgrubb commented Nov 13, 2024

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]
Loading

This does:

architecture-beta
    group agroup(cloud)[Cloud_Name]
Loading

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

  • Mermaid version: 11.4.0
  • Browser and Version: Chrome 130.0.6723.117 [arm64], Safari 18.1 (19619.2.8.111.5, 19619)[arm64]

Suggested Solutions

  • Expand parser to allow any character in the label, possibly supporting escaped brackets

Additional Context

No response

@mgrubb mgrubb added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Nov 13, 2024
@Lockszmith-GH
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

2 participants