mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-18 19:54:17 +01:00
Fix for issue #3428, load the configured diagrams even when initialize has not been called.
This commit is contained in:
@@ -146,6 +146,10 @@ export const decodeEntities = function (text) {
|
||||
* @returns {any}
|
||||
*/
|
||||
const render = function (id, _txt, cb, container) {
|
||||
if (!hasLoadedDiagrams) {
|
||||
addDiagrams();
|
||||
hasLoadedDiagrams = true;
|
||||
}
|
||||
configApi.reset();
|
||||
let txt = _txt.replace(/\r\n?/g, '\n'); // parser problems on CRLF ignore all CR and leave LF;;
|
||||
const graphInit = utils.detectInit(txt);
|
||||
|
||||
Reference in New Issue
Block a user