From 874c1e3e8203ca268ba348ffd5101dbeabdd6d5d Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Wed, 2 Sep 2020 22:51:16 +0100 Subject: [PATCH] Fixing mermaid script --- .../lib/joplin-renderer/MdToHtml/rules/mermaid_render.js | 2 +- .../lib/joplin-renderer/assets/mermaid/mermaid_render.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid_render.js b/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid_render.js index ed0e77026..bed3f3132 100644 --- a/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid_render.js +++ b/ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid_render.js @@ -18,7 +18,7 @@ function mermaidInit() { // Resetting elements size - see mermaid.ts const elements = document.getElementsByClassName('mermaid'); for (const element of elements) { - element.style.width = 'fit-content'; + element.style.width = '100%'; } } } diff --git a/ReactNativeClient/lib/joplin-renderer/assets/mermaid/mermaid_render.js b/ReactNativeClient/lib/joplin-renderer/assets/mermaid/mermaid_render.js index 52bc065c0..bed3f3132 100644 --- a/ReactNativeClient/lib/joplin-renderer/assets/mermaid/mermaid_render.js +++ b/ReactNativeClient/lib/joplin-renderer/assets/mermaid/mermaid_render.js @@ -15,6 +15,7 @@ function mermaidInit() { console.error('Mermaid error', error); } + // Resetting elements size - see mermaid.ts const elements = document.getElementsByClassName('mermaid'); for (const element of elements) { element.style.width = '100%';