Skip to content

Commit

Permalink
🐛 fix #1467
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Sep 13, 2023
1 parent fd9d2d1 commit 5386e75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

### v3.9.4 / 2023-09

* [markmap 生产环境路径错误](https://github.com/Vanessa219/vditor/issues/1467) `修复缺陷`
* [insertValue 后光标移动到插入的字符串之后](https://github.com/Vanessa219/vditor/issues/1464) `改进功能`
* [preview.actions 为空不渲染工具栏](https://github.com/Vanessa219/vditor/issues/1453) `改进功能`
* [MathJax 支持传入其他配置项](https://github.com/Vanessa219/vditor/issues/1453) `引入特性`
Expand Down
6 changes: 3 additions & 3 deletions src/ts/markdown/markmapRender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const markmapRender = (element: HTMLElement, cdn = Constants.CDN, theme:
if (markmapElements.length === 0) {
return;
}
addScript(`${cdn}/src/js/markmap/markmap.min.js`, "vditorMermaidScript").then(() => {
addScript(`${cdn}/dist/js/markmap/markmap.min.js`, "vditorMermaidScript").then(() => {
markmapElements.forEach((item) => {
const code = markmapRenderAdapter.getCode(item);
if (item.getAttribute("data-processed") === "true" || code.trim() === "") {
Expand All @@ -47,11 +47,11 @@ export const markmapRender = (element: HTMLElement, cdn = Constants.CDN, theme:
render.className = "language-markmap"
item.parentNode.appendChild(render)
init(render,code)

if(item.parentNode.childNodes[0].nodeName == "CODE"){
item.parentNode.removeChild(item.parentNode.childNodes[0])
}
});
});

};
};

0 comments on commit 5386e75

Please sign in to comment.