mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
parent
c41edc86e1
commit
a718c05324
1 changed files with 3 additions and 3 deletions
|
@ -231,10 +231,10 @@ function initMermaid( update, attrs ) {
|
||||||
var code = e.querySelector( '.mermaid-code' );
|
var code = e.querySelector( '.mermaid-code' );
|
||||||
var parse = parseGraph( decodeHTML( code.innerHTML ) );
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if( parse.dir.theme == theme || parse.yaml.theme == theme ){
|
if( parse.yaml.theme == theme || parse.dir.theme == theme ){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
is_initialized = true;
|
is_initialized = true;
|
||||||
|
@ -282,7 +282,7 @@ function initMermaid( update, attrs ) {
|
||||||
}
|
}
|
||||||
var is_initialized = ( update ? update_func( attrs ) : init_func( attrs ) );
|
var is_initialized = ( update ? update_func( attrs ) : init_func( attrs ) );
|
||||||
if( is_initialized ){
|
if( is_initialized ){
|
||||||
mermaid.init({theme: attrs.theme});
|
mermaid.init( {theme: attrs.theme} );
|
||||||
// zoom for Mermaid
|
// zoom for Mermaid
|
||||||
// https://github.com/mermaid-js/mermaid/issues/1860#issuecomment-1345440607
|
// https://github.com/mermaid-js/mermaid/issues/1860#issuecomment-1345440607
|
||||||
var svgs = d3.selectAll( '.mermaid.zoom svg' );
|
var svgs = d3.selectAll( '.mermaid.zoom svg' );
|
||||||
|
|
Loading…
Reference in a new issue