Enable myst-parser mermaid rendering without curly braces in markdown
d33bs opened this issue ยท 8 comments
Thank you for the great work within this project! In working with mermaid diagrams through this extension and myst-parser within markdown files I've noticed a minor detail which might assist developers as they draft or review content.
When using this extension via myst-parser in markdown files, one is required to use the following format:
```{mermaid}
<diagram content>
```
Some editors and interfaces, such as Github (see here), enable the rendering of mermaid without building it Sphinx. This format relies on a similar codeblock that does not use curly braces, as seen below:
```mermaid
<diagram content>
```
Using a format which does not rely on curly braces would allow developers referencing mermaid content on platforms like Github to easily view both the rendered output and the code which rendered the output. Is this something which is possible through additional configuration or code with this extension? Thank you in advance for your thoughts and feedback on this topic.
Please note: I was unsure whether it'd be more appropriate to open an issue here or with the myst-parser project. Please don't hesitate to let me know if I may reference this topic elsewhere, or upvote an existing issue, thank you!
I agree, this would indeed be useful to have! It would make collaborating and reviewing/discussing PRs much more streamlined if the mermaid diagrams were rendered in the PR files/diff view, and I think using the brace-less syntax should achieve that. Right now we can either open parallel issues where we copy/paste diagrams, or render the whole documentation and inspect that.
+1 to this feature, would be a great improvement!
+1 to this feature.
Note executablebooks/MyST-Parser#366 has been fixed by executablebooks/MyST-Parser#742 which I believe also fixes this issue.