-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Render inline mermaidjs blocks #124
Comments
Basically same as #41 (comment): it's possible to do this via a marked extension (see https://marked.js.org/using_pro). If you happen to figure out how to do this, please let us know here (: |
I wanted the feature for a school assignment of mine.
Right now I am little busy with school work but as soon as I am free I shall try to make it work eta 1 month |
So, I had a crack at this recently. It shouldn't be too hard, theoretically, but it took a bit of persuading for mermaid to actually render. See the gist below. https://gist.github.com/danishcake/d045c867594d6be175cb394995c90e2c The gotcha was that mermaid.initialize() didn't trigger the render. I had to explicitly call mermaid.run. I'm not sure why. Given this is a semi-common request, perhaps something like the above could be rolled into the documentation, or a set of pre-packaged (but optional) extensions? |
i proposed turning this into a marked extension in #145 (: sadly i don't have the time to work on it |
Problem:
Render the mermiadjs block like Github. For example:
renders to
Solution:
https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/
The text was updated successfully, but these errors were encountered: