Standard mermaid syntax for flowchart links not rendered in GitLab
Summary
- While using standard Mermaid syntax for dotted link, the displayed link is note rendered as dotted, but as a not-dotted default one.
- While using standard syntax for ranking link, an error is produced at rendering, and no flowchart is displayed.
See documentation : https://mermaid-js.github.io/mermaid/diagrams-and-syntax-and-examples/flowchart.html
Steps to reproduce
Use examples cited below in a mermaid code block inside a markdown file and hit preview, or commit changes.
Example Project
See https://gitlab.com/youennmerel/mermaid_syntax_error for two example Markdown files
What is the current bug behavior?
- While using standard Mermaid syntax for dotted link, the displayed link is not rendered as dotted, but as a not-dotted default one.
See documentation : https://mermaid-js.github.io/mermaid/diagrams-and-syntax-and-examples/flowchart.html#dotted-link
Code example :
flowchart LR;
A-.->B;
Rendering :
flowchart LR;
A-.->B;
- While using standard syntax for ranking link, an error is produced at rendering, and no flowchart is displayed.
See documentation : https://mermaid-js.github.io/mermaid/diagrams-and-syntax-and-examples/flowchart.html#minimum-length-of-a-link
Example code :
graph TD
A[Start] --> B{Is it?};
B -->|Yes| C[OK];
C --> D[Rethink];
D --> B;
B ---->|No| E[End];
Error message :
Encountered an error while rendering: Error: Parse error on line 6: ...D --> B; B ---->|No| E[End]; ----------------------^ Expecting 'SPACE', 'GRAPH', 'DIR', 'subgraph', 'end', 'AMP', 'TAGEND', 'START_LINK', 'STR', 'STYLE', 'LINKSTYLE', 'CLASSDEF', 'CLASS', 'CLICK', 'DOWN', 'UP', 'DEFAULT', 'NUM', 'COMMA', 'ALPHA', 'COLON', 'MINUS', 'BRKT', 'DOT', 'PCT', 'TAGSTART', 'PUNCTUATION', 'UNICODE_TEXT', 'PLUS', 'EQUALS', 'MULT', 'UNDERSCORE', got 'PIPE'
What is the expected correct behavior?
Flowchart is displayed in GitLab as expected by Mermaid language specification
Output of checks
This bug happens on GitLab.com
Edited by Youenn