mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-22 16:59:48 +02:00
Added support for entity codes so that it for instance is possible to represent a " with #quot; and a heart with #9829; This differs from the regular html codes in that the leading & isreplaced with a dsh and for dec codes dropped. This as referenced in issue #219.
This commit is contained in:
29
test/examples/entityCodes.html
Normal file
29
test/examples/entityCodes.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<link rel="stylesheet" href="../../dist/mermaid.css"/>
|
||||
<script src="../../dist/mermaid.js"></script>
|
||||
<style>
|
||||
body{
|
||||
background-color: #89896f;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1>Qutotes to callbacks</h1>
|
||||
<div class="mermaid" id="i211">
|
||||
graph LR
|
||||
A["A double quote:#quot;"] -->B["A dec char:#9829;"]
|
||||
B -->C["#9829; ;^; #9829;"]
|
||||
</div>
|
||||
<div class="mermaid" id="i211">
|
||||
sequenceDiagram
|
||||
Alice->>John: Hello John, how are you?♥
|
||||
John-->>Alice: Great!"
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -23,7 +23,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Links to callbacks</h1>
|
||||
A has a tooltip
|
||||
A has a tooltip and a callback <br/>
|
||||
B has a link and a tooltip <br/>
|
||||
C has a long tooltip <br/>
|
||||
<div class="mermaid" id="i211">
|
||||
graph LR;
|
||||
A-->B;
|
||||
@@ -34,23 +36,12 @@
|
||||
</div>
|
||||
|
||||
<h1>Links to urls</h1>
|
||||
A second diagram that should have its own callback on A even though the node has the same id.
|
||||
<div class="mermaid" id="i213">
|
||||
graph LR;
|
||||
A-->B
|
||||
B-->C
|
||||
click A callback2 "Tooltip3"
|
||||
</div>
|
||||
<div class="mermaid" id="i213">
|
||||
graph LR;
|
||||
subgraph S1
|
||||
a-->b
|
||||
end
|
||||
subgraph S2
|
||||
c-->d
|
||||
c-->d
|
||||
end
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user