Improve UI displayed for mermaid parsing errors when Previewing comment
Summary
While writing some mermaid in a code fence in an MR comment, I flipped to Preview
and got this unfriendly error.
My mermaid code had an error; you can't use parens in the label
```mermaid
graph LR
D[Source Branch] --> C[Target]
C --> B[Branch A (Protected)]
B --> A[main (Protected)]
```
Steps to reproduce
- Enter invalid mermaid within a into comment field
- Switch to
[Preview]
Example Project
What is the current bug behavior?
User sees raw parsing error.
What is the expected correct behavior?
User should be informed there was an error in a meaningful, human-readable manner.
Edited by Kerri Miller