mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 13:29:40 +02:00
Moved diagram registration out of initialize func
This commit is contained in:
@@ -40,6 +40,9 @@ import utils, { directiveSanitizer } from './utils';
|
|||||||
import assignWithDepth from './assignWithDepth';
|
import assignWithDepth from './assignWithDepth';
|
||||||
import DOMPurify from 'dompurify';
|
import DOMPurify from 'dompurify';
|
||||||
import mermaid from './mermaid';
|
import mermaid from './mermaid';
|
||||||
|
|
||||||
|
addDiagrams();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param text
|
* @param text
|
||||||
* @param dia
|
* @param dia
|
||||||
@@ -512,7 +515,6 @@ function initialize(options) {
|
|||||||
|
|
||||||
updateRendererConfigs(config);
|
updateRendererConfigs(config);
|
||||||
setLogLevel(config.logLevel);
|
setLogLevel(config.logLevel);
|
||||||
addDiagrams();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const mermaidAPI = Object.freeze({
|
const mermaidAPI = Object.freeze({
|
||||||
|
Reference in New Issue
Block a user