mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-17 22:39:56 +02:00
test fix
This commit is contained in:
@@ -19,7 +19,7 @@ const contentLoaded = function() {
|
||||
div.className = 'mermaid';
|
||||
div.innerHTML = graphObj.code;
|
||||
document.getElementsByTagName('body')[0].appendChild(div);
|
||||
global.mermaid.initialize(escapeDiagram(graphObj.mermaid));
|
||||
global.mermaid.initialize(graphObj.mermaid);
|
||||
// console.log('graphObj.mermaid', graphObj.mermaid)
|
||||
global.mermaid.init();
|
||||
}
|
||||
@@ -36,7 +36,7 @@ const contentLoadedApi = function() {
|
||||
div.className = 'mermaid';
|
||||
// div.innerHTML = graphObj.code
|
||||
document.getElementsByTagName('body')[0].appendChild(div);
|
||||
global.mermaid.initialize(escapeDiagram(graphObj.mermaid));
|
||||
global.mermaid.initialize(graphObj.mermaid);
|
||||
|
||||
mermaid2.render(
|
||||
'newid',
|
||||
@@ -51,10 +51,6 @@ const contentLoadedApi = function() {
|
||||
}
|
||||
};
|
||||
|
||||
const escapeDiagram = function(diagram) {
|
||||
return diagram.replace(/</g, '<').replace('/>/g', '>');
|
||||
};
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
/*!
|
||||
* Wait for document loaded before starting the execution
|
||||
|
Reference in New Issue
Block a user