Moved diagram registration out of initialize func

This commit is contained in:
ashishj 2022-08-18 17:54:42 +02:00
parent db4ff451bf
commit b21cb43639
1 changed files with 3 additions and 1 deletions

View File

@ -40,6 +40,9 @@ import utils, { directiveSanitizer } from './utils';
import assignWithDepth from './assignWithDepth';
import DOMPurify from 'dompurify';
import mermaid from './mermaid';
addDiagrams();
/**
* @param text
* @param dia
@ -512,7 +515,6 @@ function initialize(options) {
updateRendererConfigs(config);
setLogLevel(config.logLevel);
addDiagrams();
}
const mermaidAPI = Object.freeze({