Open alamise opened 1 year ago
Encountering an erroneous chart results in an error and the process terminates.
In my opinion, this is expected behavior, and it's what I'd want mermaid-cli
to do.
It might make sense to add an option (maybe something like --replace-invalid-mermaid
) that prints a warning if a mermaid chart is invalid, something like what GitHub does:
```mermaid
flowchart
This is my example invalid diagram.
### Output
![image](https://github.com/mermaid-js/mermaid-cli/assets/19716675/526633b9-6004-4197-805c-1264ff96a325)
_Edit_: By the way @alamise, I hope you don't mind, I edited your issue title! Please feel free to change it something else if you'd prefer.
I have a requirement: to replace the charts saved in mermaid format in a markdown file (
c.md
) with actual images. So, I installed mermaid-cli and executed the following command:It's basically working fine, but there is a small issue: There are multiple charts in
c.md
, and one of them has an incorrect format.Expected behavior: Skip the erroneous chart and convert the charts with the correct format. The erroneous chart should retain its original code in the markdown file.
Current behavior: Encountering an erroneous chart results in an error and the process terminates.