Browse Source

:bug: fix https://github.com/Vanessa219/vditor/issues/1467

Vanessa 2 years ago
parent
commit
5386e75a68
2 changed files with 4 additions and 3 deletions
  1. 1 0
      CHANGELOG.md
  2. 3 3
      src/ts/markdown/markmapRender.ts

+ 1 - 0
CHANGELOG.md

@@ -13,6 +13,7 @@
 
 
 ### v3.9.4 / 2023-09
 ### v3.9.4 / 2023-09
 
 
+* [markmap 生产环境路径错误](https://github.com/Vanessa219/vditor/issues/1467) `修复缺陷`
 * [insertValue 后光标移动到插入的字符串之后](https://github.com/Vanessa219/vditor/issues/1464) `改进功能`
 * [insertValue 后光标移动到插入的字符串之后](https://github.com/Vanessa219/vditor/issues/1464) `改进功能`
 * [preview.actions 为空不渲染工具栏](https://github.com/Vanessa219/vditor/issues/1453) `改进功能`
 * [preview.actions 为空不渲染工具栏](https://github.com/Vanessa219/vditor/issues/1453) `改进功能`
 * [MathJax 支持传入其他配置项](https://github.com/Vanessa219/vditor/issues/1453) `引入特性`
 * [MathJax 支持传入其他配置项](https://github.com/Vanessa219/vditor/issues/1453) `引入特性`

+ 3 - 3
src/ts/markdown/markmapRender.ts

@@ -37,7 +37,7 @@ export const markmapRender = (element: HTMLElement, cdn = Constants.CDN, theme:
     if (markmapElements.length === 0) {
     if (markmapElements.length === 0) {
         return;
         return;
     }
     }
-    addScript(`${cdn}/src/js/markmap/markmap.min.js`, "vditorMermaidScript").then(() => {
+    addScript(`${cdn}/dist/js/markmap/markmap.min.js`, "vditorMermaidScript").then(() => {
         markmapElements.forEach((item) => {
         markmapElements.forEach((item) => {
             const code = markmapRenderAdapter.getCode(item);
             const code = markmapRenderAdapter.getCode(item);
             if (item.getAttribute("data-processed") === "true" || code.trim() === "") {
             if (item.getAttribute("data-processed") === "true" || code.trim() === "") {
@@ -47,11 +47,11 @@ export const markmapRender = (element: HTMLElement, cdn = Constants.CDN, theme:
             render.className = "language-markmap"
             render.className = "language-markmap"
             item.parentNode.appendChild(render)
             item.parentNode.appendChild(render)
             init(render,code)
             init(render,code)
-    
+
             if(item.parentNode.childNodes[0].nodeName == "CODE"){
             if(item.parentNode.childNodes[0].nodeName == "CODE"){
                 item.parentNode.removeChild(item.parentNode.childNodes[0])
                 item.parentNode.removeChild(item.parentNode.childNodes[0])
             }
             }
         });
         });
     });
     });
 
 
-};
+};