Skip to content

Sequence diagrams hang up due to lack of spaces after "as" #6399

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

Open
shiniizk opened this issue Mar 21, 2025 · 1 comment
Open

Sequence diagrams hang up due to lack of spaces after "as" #6399

shiniizk opened this issue Mar 21, 2025 · 1 comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@shiniizk
Copy link

Description

The code following makes browser hang up. The point is the lack of the space after "as".

sequenceDiagram
participant X_AutoPublishable asAAAAAAAAAAAAA:AAAAAAAAAAAAA

Steps to reproduce

Put this code into Mermaid Live Editor or other editors.

sequenceDiagram
participant X_AutoPublishable asAAAAAAAAAAAAA:AAAAAAAAAAAAA

Screenshots

No response

Code Sample

sequenceDiagram
participant X_AutoPublishable asAAAAAAAAAAAAA:AAAAAAAAAAAAA

Setup

  • Mermaid version: v11.5.0
  • Browser and Version: Chrome 134.0.6998.89 / macOS 15.2

Suggested Solutions

No response

Additional Context

No response

@shiniizk shiniizk added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Mar 21, 2025
@BambioGaming
Copy link

The hang in Mermaid.js sequence diagrams when omitting a space after as (e.g. participant X asY) is due to how the parser interprets tokens in the diagram syntax. To avoid this issue, ensure that there is a space after the "as" keyword in participant declarations:

sequenceDiagram
participant X_AutoPublishable as AAAAAAAAAAAAA:AAAAAAAAAAAAA

Better error handling and clearer grammar definitions could prevent this hang entirely.

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