aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/markup/mermaid.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/markup/mermaid.js')
-rw-r--r--web_src/js/markup/mermaid.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/markup/mermaid.js b/web_src/js/markup/mermaid.js
index 773c46e791..62de9a3aae 100644
--- a/web_src/js/markup/mermaid.js
+++ b/web_src/js/markup/mermaid.js
@@ -50,7 +50,7 @@ export async function renderMermaid() {
// can't use bindFunctions here because we can't cross the iframe boundary. This
// means js-based interactions won't work but they aren't intended to work either
mermaid.mermaidAPI.render('mermaid', source, (svgStr) => {
- const heightStr = (svgStr.match(/height="(.+?)"/) || [])[1];
+ const heightStr = (svgStr.match(/viewBox="(.+?)"/) || ['', ''])[1].split(/\s+/)[3];
if (!heightStr) return displayError(el, new Error('Could not determine chart height'));
const iframe = document.createElement('iframe');
iframe.classList.add('markup-render');