Mermaid syntax errors are not displayed
See original GitHub issueDescribe the bug When the input file contains a syntax error, the output is “Generating single mermaid chart” and the generated image contains “Syntax error in graph”.
To Reproduce Steps to reproduce the behavior:
I am using the docker container
- My input file is in
$HOME/Mermaid
folder - Execute :
docker run -u 1000 -it --rm -v $HOME/Mermaid:/data minlag/mermaid-cli -i "/data/seq-diagram.mmd" -o "/data/seq-diagram.png"
- You get the “Generating single mermaid chart” message and the generated image contains “Syntax error in graph”
Inside the container I do not get any other message
- My input file is in
$HOME/Mermaid
folder - Go inside the container :
docker run -u 1000 -it --rm --entrypoint /bin/sh -v $HOME/Progs/Mermaid:/data minlag/mermaid-cli
- Execute :
./node_modules/.bin/mmdc -p "/puppeteer-config.json" -i "/data/seq-diagram.mmd" -o "/data/seq-diagram.png"
- You get the “Generating single mermaid chart” message and the generated image contains “Syntax error in graph”
Expected behavior I would like to see the syntax error so that I can fix it
Parse error on line 30:
...ger->>ABC auth->> User SMS au
-----------------------^
Expecting 'TXT', got 'SOLID_ARROW'
Screenshots
Desktop:
- OS: Ubuntu
- Version 20.04
- Browser inside the container :
$ /usr/bin/chromium-browser --version
Chromium 99.0.4844.84
$ ./node_modules/.bin/mmdc -p "/puppeteer-config.json" --version
8.14.0
Additional context I am not used to JavaScript but it seems like the following question in SO : https://stackoverflow.com/questions/51907677/log-console-calls-made-in-client-side-code-from-the-puppeteer-node-js-process
It seems that you could catch console events that happen in puppeteer / chromium to log them in Node … as I understand it
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Refreshing page will show Syntax error in mermaid graph ...
Always show the correctly rendered MermaidJS graph. Actual behaviour. Sometimes normal, while sometimes not. Refreshing page but with cache ...
Read more >Mermaid syntax error on trying render a diagram on Github ...
Mermaid syntax error on trying render a diagram on Github . md file - Stack Overflow. Stack Overflow for Teams – Start collaborating...
Read more >Standard mermaid syntax for flowchart links not rendered in ...
While using standard syntax for ranking link, an error is produced at rendering, and no flowchart is displayed.
Read more >Valid mermaid syntax reporting errors - Visual Studio Feedback
We've just started using the Wiki in our Azure DevOps project and I'm working on some simple introductions to using the key features....
Read more >Markdown mermaid ClassDiagram annotations generate ...
The generated class diagram should have the annotation displayed in the digaram. What happens instead? The block displays a error "Syntax error in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@multimeric Done! https://github.com/mermaid-js/mermaid/pull/3052 Thank you for your help! You are welcome to create PRs for the functionality which is missing in mermaid-cli - I will review them and accept if no issues 😄
Thank you! 😄