Closed humphd closed 1 year ago
I didn’t realize this at the moment of writing, but this is another breaking change. I’ll add this to the release notes. Both remark-mermaidjs@5
and rehype-mermaidjs
are now asynchronous in the browser. There’s not much I can do about it, as mermaid.render()
is now asynchronous. Unfortunately remark-markdown
can’t use async plugins at the moment (https://github.com/remarkjs/react-markdown/issues/680).
I recommend to stay on remark-mermaidjs@4
for now. Most of the benefits don’t affect browser usage anyway.
I also note that upon installation, I get this warning:
warning "rehype-mermaidjs > mermaid-isomorphic > mermaid > @khanacademy/simple-markdown@0.9.2" has incorrect peer dependency "react@16.14.0"
A fix for this hast just been merged (https://github.com/mermaid-js/mermaid/pull/4350#event-9187183410). This warning will go away soon.
@remcohaszing They have merged it. I hope this issue gets fixed soon.
https://github.com/remarkjs/react-markdown/issues/680 is still open.
As for the warning, that has been fixed. You may need to regenerate your lockfile.
Based on the warning in the recent release of remark-mermaidjs, I've tried migrating to
rehype-mermaidjs
. I'm having some issues using it as a drop-in replacement for what I had previously.Here is what I'm doing:
This ends up crashing like so at runtime:
I also note that upon installation, I get this warning:
My goal is to be able to use a plugin to render Mermaid blocks in React Markdown. Perhaps this package isn't the best fit? Or maybe I'm missing something.