1.4 KB60 lines
Blame
1<!doctype html>
2<html>
3 <head>
4 <meta charset="utf-8" />
5 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6 <title>Mermaid Quick Test Page</title>
7 <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" />
8 </head>
9 <body>
10 <div id="test">
11 <pre class="mermaid">
12 flowchart
13 a[This should be visible]
14 </pre
15 >
16 <pre class="mermaid">
17 flowchart
18 a --< b
19 </pre
20 >
21 <pre class="mermaid">
22 flowchart
23 a[This should be visible]
24 </pre
25 >
26 <pre class="mermaid">
27 ---
28 config:
29 suppressErrorRendering: true # This should not affect anything, as suppressErrorRendering is a secure config
30 ---
31 flowchart
32 a --< b
33 </pre
34 >
35 <pre class="mermaid">
36 ---
37 config:
38 suppressErrorRendering: false # This should not affect anything, as suppressErrorRendering is a secure config
39 ---
40 flowchart
41 a --< b
42 </pre
43 >
44 </div>
45 <script type="module">
46 import mermaid from './mermaid.esm.mjs';
47 const shouldSuppress =
48 new URLSearchParams(window.location.search).get('suppressErrorRendering') === 'true';
49 mermaid.initialize({ startOnLoad: false, suppressErrorRendering: shouldSuppress });
50 try {
51 await mermaid.run();
52 } catch {
53 if (window.Cypress) {
54 window.rendered = true;
55 }
56 }
57 </script>
58 </body>
59</html>
60