Closed shtratos closed 1 year ago
@sidharthv96 thank you, I've applied your recommendation but still running into an error. See the stacktraces above. Please have a look when you have time.
btw, source maps do not work for me out of the box inside VSCode on Win11, so here's another branch with extra hacks to inline source maps. This allowed me to actually see where the error happens. https://github.com/shtratos/vscode-markdown-mermaid/compare/upgrade-to-mermaid-10...shtratos:vscode-markdown-mermaid:upgrade-to-mermaid-10-with-inline-sourcemaps
That error might be a mermaid bug. Will check that out.
Thank you for looking into this
I introduced some conflicts picking up 9.4. Because of this and because error rendering needed more attention, I've opened another PR that I think lets us upgrade to mermaid 10: #188
@shtratos Can you please help test out the new PR and see if everything looks ok
Mermaid version 10.0.2 is the latest, but it has some breaking API changes.
I had to change the
mermaid.render
call as it no longer accepts a callback. see https://github.com/mermaid-js/mermaid/blob/master/CHANGELOG.md#1000N.B. I tested the rendering and it works for correct graph, but it does not render parsing errors.
I see the following error in DevTools console whenever I try to render broken diagram:
This can be traced to this code in
Diagram.ts
anddiagramAPI.ts
Not sure if this is a bug in Mermaid or if I'm calling it incorrectly. Any help would be appreciated.