diff --git a/cypress/integration/rendering/classDiagram.spec.js b/cypress/integration/rendering/classDiagram.spec.js index 1532464e6..9c0b51581 100644 --- a/cypress/integration/rendering/classDiagram.spec.js +++ b/cypress/integration/rendering/classDiagram.spec.js @@ -7,7 +7,7 @@ describe('Class diagram', () => { ` classDiagram Class01 <|-- AveryLongClass : Cool - <> Class01 + <<interface>> 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>> int id test() } diff --git a/cypress/platform/viewer.js b/cypress/platform/viewer.js index 35f487d5b..ec42fff6a 100644 --- a/cypress/platform/viewer.js +++ b/cypress/platform/viewer.js @@ -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', '>'); -}; - if (typeof document !== 'undefined') { /*! * Wait for document loaded before starting the execution