mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Fix for issue #3428, load the configured diagrams even when initialize has not been called.
This commit is contained in:
parent
e5212c25f5
commit
0f56c9a85d
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mermaid",
|
||||
"version": "9.1.6",
|
||||
"version": "9.1.7",
|
||||
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||
"main": "dist/mermaid.min.js",
|
||||
"module": "dist/mermaid.esm.min.mjs",
|
||||
@ -122,4 +122,4 @@
|
||||
"**/*.css",
|
||||
"**/*.scss"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user