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 · 3 comments · May be fixed by #6130
Open

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

mgrubb opened this issue Nov 13, 2024 · 3 comments · May be fixed by #6130
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.

@inahga
Copy link

inahga commented Dec 12, 2024

Looks related to #5928 which has a PR #5929.

mgrubb added a commit to mgrubb/mermaid that referenced this issue Dec 12, 2024
Add example in demos/architecture.html
Adds some rudimentary unit tests for architecture parser
mgrubb added a commit to mgrubb/mermaid that referenced this issue Dec 12, 2024
Add example in demos/architecture.html
Adds some rudimentary unit tests for architecture parser
@mgrubb mgrubb linked a pull request Dec 12, 2024 that will close this issue
4 tasks
@mgrubb
Copy link
Author

mgrubb commented Dec 12, 2024

That issue didn't show up in my original search, and I also didn't see the associated PR before I created mine.

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

Successfully merging a pull request may close this issue.

3 participants