This commit is contained in:
Christian Klemm 2019-10-05 00:46:56 +02:00
parent 723fe84383
commit 92eec664b1
No known key found for this signature in database
GPG Key ID: 57578469FC907C48
2 changed files with 4 additions and 8 deletions

View File

@ -7,7 +7,7 @@ describe('Class diagram', () => {
`
classDiagram
Class01 <|-- AveryLongClass : Cool
<<interface>> Class01
&lt;&lt;interface&gt;&gt; Class01
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
@ -21,7 +21,7 @@ describe('Class diagram', () => {
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10 {
<<service>>
&lt;&lt;service&gt;&gt;
int id
test()
}

View File

@ -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, '&lt;').replace('/>/g', '&gt;');
};
if (typeof document !== 'undefined') {
/*!
* Wait for document loaded before starting the execution