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

Some previews in the Flowchart documentation are failing #6455

Closed
kimulaco opened this issue Apr 3, 2025 · 2 comments · Fixed by #6456
Closed

Some previews in the Flowchart documentation are failing #6455

kimulaco opened this issue Apr 3, 2025 · 2 comments · Fixed by #6456
Labels
Area: Documentation P1 Status: Approved Is ready to be worked on Type: Bug / Error Something isn't working or is incorrect

Comments

@kimulaco
Copy link

kimulaco commented Apr 3, 2025

Description

Hi, thanks for maintaining this great library!

On the Flowchart documentation page, some previews fail to render, displaying multiple errors:
Syntax error in text mermaid version 11.6.0
https://mermaid.js.org/syntax/flowchart.html

Additionally, I see errors in the console, such as:

Error: Lexical error on line 2. Unrecognized text.
flowchart LR  A e1@–> B
-------------------^
    at Y1.parseError (flowDiagram-RXJ4TZVH.CdDNEOTH.js:9:33370)
    at Object.parseError (flowDiagram-RXJ4TZVH.CdDNEOTH.js:11:1245)
    at Object.next (flowDiagram-RXJ4TZVH.CdDNEOTH.js:13:1822)
    at Object.lex (flowDiagram-RXJ4TZVH.CdDNEOTH.js:14:101)
    at lex (flowDiagram-RXJ4TZVH.CdDNEOTH.js:9:34085)
    at Y1.parse (flowDiagram-RXJ4TZVH.CdDNEOTH.js:9:34331)
    at Vt.parse (flowDiagram-RXJ4TZVH.CdDNEOTH.js:15:14)
    at Diagram.fromText (theme.DKjXgAIk.js:208:300)
    at Object.render (theme.DKjXgAIk.js:215:1257)
    at theme.DKjXgAIk.js:215:5759

Steps to reproduce

  1. Open the Flowchart documentation page.
    https://mermaid.js.org/syntax/flowchart.html

Screenshots

Image

Code Sample


Setup

  • Mermaid version: 11.6.0
  • Browser and Version: [Chrome 135, Safari 18.4, Firefox 137]

Suggested Solutions

The following preview is failing.

Additional Context

  • The issue also occurs on the develop branch.
@kimulaco kimulaco added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Apr 3, 2025
@knsv knsv added Status: Approved Is ready to be worked on Area: Documentation P1 and removed Status: Triage Needs to be verified, categorized, etc labels Apr 4, 2025
@knsv
Copy link
Collaborator

knsv commented Apr 4, 2025

This should be fixed! Thanks for raising it.

@nour0205
Copy link

nour0205 commented Apr 4, 2025

Hello @kimulaco
I’ve submitted a PR to fix the broken example in the “Attaching an ID to Edges” section of the Flowchart documentation.

The issue was caused by using e1@-> instead of the correct e1@-->, which led to a parsing error in Mermaid v11.6.0.

PR: #6456

Could you please take a look and review it when you get a chance?
Thanks again for your amazing work on this library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Documentation P1 Status: Approved Is ready to be worked on 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