From a718c0532412cdfc1ad1ca35ea07a3d6deb4b39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sat, 5 Aug 2023 14:06:57 +0200 Subject: [PATCH] mermaid: formatting #601 #603 --- static/js/theme.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/theme.js b/static/js/theme.js index 0ba1586bed..dbfa83b350 100644 --- a/static/js/theme.js +++ b/static/js/theme.js @@ -231,10 +231,10 @@ function initMermaid( update, attrs ) { var code = e.querySelector( '.mermaid-code' ); var parse = parseGraph( decodeHTML( code.innerHTML ) ); - if( parse.dir.relearn_user_theme || parse.yaml.relearn_user_theme ){ + if( parse.yaml.relearn_user_theme || parse.dir.relearn_user_theme ){ return; } - if( parse.dir.theme == theme || parse.yaml.theme == theme ){ + if( parse.yaml.theme == theme || parse.dir.theme == theme ){ return; } is_initialized = true; @@ -282,7 +282,7 @@ function initMermaid( update, attrs ) { } var is_initialized = ( update ? update_func( attrs ) : init_func( attrs ) ); if( is_initialized ){ - mermaid.init({theme: attrs.theme}); + mermaid.init( {theme: attrs.theme} ); // zoom for Mermaid // https://github.com/mermaid-js/mermaid/issues/1860#issuecomment-1345440607 var svgs = d3.selectAll( '.mermaid.zoom svg' );