cherry-markdown
cherry-markdown copied to clipboard
[Bug Report] 不支持mermaid@^10.9.1
Prerequisites
- [ ] There isn't an existing issue that reports the same bug to avoid duplicates.
- [ ] The provided information offers a minimal reproducible example of the bug.
- [ ] For Q&A, please open a GitHub Discussion instead.
Describe the Bug
使用 mermaid@^9.4.3,正常渲染。使用 mermaid@^10.9.1,报错:
TypeError: Cannot read properties of undefined (reading 'createElementNS')
at Function.<anonymous> (chunk-O6LIT62K.js?v=786ab0a5:1140:122)
at Function.<anonymous> (chunk-O6LIT62K.js?v=786ab0a5:1157:37)
at Selection.select_default [as select] (chunk-O6LIT62K.js?v=786ab0a5:580:51)
at Selection.append_default [as append] (chunk-O6LIT62K.js?v=786ab0a5:1156:15)
at appendDivSvgG (chunk-O6LIT62K.js?v=786ab0a5:17313:35)
at Object.render$1 [as render] (chunk-O6LIT62K.js?v=786ab0a5:17364:5)
at t2.value (cherry-markdown_dist_addons_cherry-code-block-mermaid-plugin.js?v=786ab0a5:1234:33)
at n2.value (cherry-markdown_dist_cherry-markdown__core.js?v=786ab0a5:12555:23)
at cherry-markdown_dist_cherry-markdown__core.js?v=786ab0a5:12657:113
at String.replace (<anonymous>)
请问什么时间能够支持新版mermaid?
Reproduction Steps
No response
System Information
No response
Contributing
None
https://github.com/mermaid-js/mermaid/issues/4569#issuecomment-1616420972 看了下,是mermaid v10的api变成异步的了。。我们看看怎么兼容下
已发新版(0.9.3)支持配置最新版mermaid,具体实现可以参考这个demo哈