-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
```mermaid is not always rendered #410
Comments
This happens for me all the time in current FF releases but not Chrome. This is because there is a race condition between You can avoid this by reissuing the initialization from your own js file by function supportMermaidCodeFence(){
// This is a bugfix for FF, because Mermaids converter may run
// before our Hugo theme changed the diagram to fit Mermaids rules
if( !mermaid ){
return;
}
if( jQuery( '.language-mermaid' ).length ){
// as long as we have those nodes our theme is not
// done with loading
setTimeout( supportMermaidCodeFence, 10 );
}
jQuery( '.mermaid' ).each( function(){
var $this = jQuery( this );
if( !$this.find( '> svg' ).length ){
mermaid.init( undefined, $this );
}
});
}
$(document).ready(function(){
supportMermaidCodeFence();
}); But this is just a workaround. Nevertheless Mermaid-Code-Fences suffer from another bug, where they will not render while a search term is found in the diagramms source code. This is an issue in all browsers. Just type a plain Also Mermaid wasn't updated for ages. Current version is 8.7.0 |
#226 allows to use
```mermaid
blocks but they don't render all the time.I think that
run's after
mermaid.initialize()
on some machines.The text was updated successfully, but these errors were encountered: