From eb7b342dab9e58dedc4fd6e9ab50b7f2d8acbfe6 Mon Sep 17 00:00:00 2001 From: yuhan6665 <1588741+yuhan6665@users.noreply.github.com> Date: Sun, 9 Apr 2023 11:53:11 -0400 Subject: [PATCH] Attempt to fix mermaid v10 --- docs/.vuepress/theme/components/Mermaid.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/.vuepress/theme/components/Mermaid.vue b/docs/.vuepress/theme/components/Mermaid.vue index fb59ab07a..85991701e 100644 --- a/docs/.vuepress/theme/components/Mermaid.vue +++ b/docs/.vuepress/theme/components/Mermaid.vue @@ -31,10 +31,11 @@ export default defineComponent({ theme: dark.value ? "dark" : "default", }); mermaid.default.render( - chartID.value, - decodeURI(rawGraph.value), - (svgCode, bindFunc) => { - html.innerHtml = svgCode; + chartID.value!, + decodeURI(rawGraph.value!) + ).then( + ({svg, bindFunctions}) => { + html.innerHtml = svg; } ); }); @@ -47,10 +48,11 @@ export default defineComponent({ theme: dark.value ? "dark" : "default", }); mermaid.default.render( - chartID.value, - decodeURI(rawGraph.value), - (svgCode, bindFunc) => { - html.innerHtml = svgCode; + chartID.value!, + decodeURI(rawGraph.value!) + ).then( + ({svg, bindFunctions}) => { + html.innerHtml = svg; } ); });