-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Open
Labels
Status: TriageNeeds to be verified, categorized, etcNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrectSomething isn't working or is incorrect
Description
Description
In an ER Diagram, adding a relationship that contains a left-hand 1 alias followed by non-aliased -- or .. with a space between the two (e.g. 1 -- 1+) causes a parsing error.
Steps to reproduce
- Create an ER Diagram
- Add a relationship such as
A 1 -- 1+ B: label - Get a parsing error on the first
1
Screenshots
Error: Error: Parse error on line 7:
...1-- 1+ B: labelA 1 -- 1+ B: label
----------------------^
Expecting 'EOF', 'SPACE', 'NEWLINE', 'COLON', 'STYLE_SEPARATOR', 'BLOCK_START', 'SQS', 'SQE', 'title', 'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'direction_tb', 'direction_bt', 'direction_rl', 'direction_lr', 'CLASSDEF', 'UNICODE_TEXT', 'CLASS', 'STYLE', 'NUM', 'ENTITY_NAME', 'DECIMAL_NUM', 'ENTITY_ONE', 'ZERO_OR_ONE', 'ZERO_OR_MORE', 'ONE_OR_MORE', 'ONLY_ONE', 'MD_PARENT', got 'IDENTIFYING'
Code Sample
erDiagram
%% working
A 1-- 1+ B: label
%% not working
A 1 -- 1+ B: label
Setup
- Mermaid version: 11.13.0
- Browser and Version: Chrome 146.0.7680.72
Suggested Solutions
No response
Additional Context
This was introduced in 11.13.0, likely by #7375, but #6984 affects similar parsing rules as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: TriageNeeds to be verified, categorized, etcNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrectSomething isn't working or is incorrect