Reverse arrows <-- not supported in flowchart #6402
Labels
Status: Triage
Needs to be verified, categorized, etc
Type: Bug / Error
Something isn't working or is incorrect
Description
Using a reverse arrow (<--) in a Mermaid flowchart diagram leads to a cryptic syntax error. Many users may naturally assume B <-- C is valid, expecting it to behave like C --> B, especially since reverse arrows are supported in other graphing tools.
Instead of a helpful explanation, Mermaid throws the following error:
Expecting 'LINK', 'UNICODE_TEXT', 'EDGE_TEXT', got '1'
This behavior is confusing and not well-documented. Either the syntax should be supported, or Mermaid should provide a more descriptive error message.
Steps to reproduce
Expecting 'LINK', 'UNICODE_TEXT', 'EDGE_TEXT', got '1'
Screenshots
Code Sample
Setup
Suggested Solutions
Add support for B <-- C syntax and internally convert it to C --> B.
Improve error messaging for unsupported arrow syntax.
Instead of a cryptic parser error, show:
"Reverse arrows (<--) are not currently supported. Try writing C --> B instead."
Additional Context
No response
The text was updated successfully, but these errors were encountered: