From 6d2552ea6e74facf17e76aaf4752871fce30eead Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 8 Nov 2022 19:26:02 +0530 Subject: [PATCH] fix: Filenames --- cypress/platform/viewer.js | 6 +++--- docs/index.html | 2 +- packages/mermaid/src/docs/index.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cypress/platform/viewer.js b/cypress/platform/viewer.js index f0426dc09..54029010f 100644 --- a/cypress/platform/viewer.js +++ b/cypress/platform/viewer.js @@ -1,4 +1,5 @@ import mermaid2 from '../../packages/mermaid/src/mermaid'; +import mindmap from '../../packages/mermaid-example-diagram/src/detector'; function b64ToUtf8(str) { return decodeURIComponent(escape(window.atob(str))); @@ -9,7 +10,7 @@ function b64ToUtf8(str) { * configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the * page. */ -const contentLoaded = function () { +const contentLoaded = async function () { let pos = document.location.href.indexOf('?graph='); if (pos > 0) { pos = pos + 7; @@ -36,8 +37,7 @@ const contentLoaded = function () { document.getElementsByTagName('body')[0].appendChild(div); } - graphObj.mermaid.lazyLoadedDiagrams = ['/mermaid-mindmap-detector.esm.mjs']; - + await mermaid2.registerExternalDiagrams([mindmap]); mermaid2.initialize(graphObj.mermaid); mermaid2.init(); } diff --git a/docs/index.html b/docs/index.html index e757a8e78..fb98ed958 100644 --- a/docs/index.html +++ b/docs/index.html @@ -50,7 +50,7 @@