Skip to content

Commit 0661c23

Browse files
committed
Add Mermaid syntax highlighting
1 parent 125a871 commit 0661c23

File tree

2 files changed

+174
-0
lines changed

2 files changed

+174
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<SyntaxDefinition name="Mermaid" extensions=".mmd;.mermaid">
4+
5+
<Environment>
6+
<Default color="#D4D4D4" bgcolor="#1E1E1E"/>
7+
<Selection color="#1E1E1E" bgcolor="#264F78"/>
8+
<LineNumbers color="#858585" bgcolor="#1E1E1E"/>
9+
<CaretMarker color="#AEAFAD"/>
10+
<VRuler color="#2A2A2A"/>
11+
12+
<FoldLine color="#858585" bgcolor="#1E1E1E"/>
13+
<FoldMarker color="#D4D4D4" bgcolor="#1E1E1E"/>
14+
<SelectedFoldLine color="#D4D4D4" bgcolor="#1E1E1E"/>
15+
16+
<EOLMarkers color="#404040"/>
17+
<SpaceMarkers color="#404040"/>
18+
<TabMarkers color="#404040"/>
19+
<InvalidLines color="#404040"/>
20+
</Environment>
21+
22+
<Properties>
23+
<Property name="LineComment" value="%%"/>
24+
</Properties>
25+
26+
<Digits name="Digits" color="#B5CEA8"/>
27+
28+
<RuleSets>
29+
<RuleSet ignorecase="true">
30+
31+
<Delimiters>()[]{},:.@`=;+-*/%~ &amp;|^&gt;&lt;</Delimiters>
32+
33+
<Span name="LineComment" stopateol="true" color="#608B4E" bold="false" italic="false">
34+
<Begin>%%</Begin>
35+
</Span>
36+
37+
<Span name="String" stopateol="true" color="#CE9178" bold="false" italic="false" escapecharacter="\">
38+
<Begin>"</Begin>
39+
<End>"</End>
40+
</Span>
41+
42+
<KeyWords name="Keywords" color="#569CD6" bold="false" italic ="false">
43+
<Key word="graph"/>
44+
<Key word="flowchart"/>
45+
<Key word="sequenceDiagram"/>
46+
<Key word="classDiagram"/>
47+
<Key word="stateDiagram"/>
48+
<Key word="stateDiagram-v2"/>
49+
<Key word="erDiagram"/>
50+
<Key word="gantt"/>
51+
<Key word="pie"/>
52+
<Key word="journey"/>
53+
<Key word="gitGraph"/>
54+
<Key word="mindmap"/>
55+
<Key word="timeline"/>
56+
<Key word="C4Context"/>
57+
<Key word="C4Container"/>
58+
<Key word="C4Component"/>
59+
<Key word="C4Dynamic"/>
60+
<Key word="C4Deployment"/>
61+
<Key word="subgraph"/>
62+
<Key word="end"/>
63+
<Key word="direction"/>
64+
<Key word="classDef"/>
65+
<Key word="class"/>
66+
<Key word="linkStyle"/>
67+
<Key word="style"/>
68+
<Key word="note"/>
69+
<Key word="participant"/>
70+
<Key word="actor"/>
71+
<Key word="loop"/>
72+
<Key word="alt"/>
73+
<Key word="opt"/>
74+
<Key word="par"/>
75+
<Key word="rect"/>
76+
<Key word="critical"/>
77+
<Key word="break"/>
78+
<Key word="activate"/>
79+
<Key word="deactivate"/>
80+
<Key word="title"/>
81+
<Key word="section"/>
82+
<Key word="dateFormat"/>
83+
<Key word="axisFormat"/>
84+
</KeyWords>
85+
</RuleSet>
86+
</RuleSets>
87+
</SyntaxDefinition>
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<SyntaxDefinition name="Mermaid" extensions=".mmd;.mermaid">
4+
5+
<Environment>
6+
<Default color="Black" bgcolor="#FFFFFF"/>
7+
<Selection color="Black" bgcolor="#C3C3FF"/>
8+
<LineNumbers color="Gray" bgcolor="#FFFFFF"/>
9+
<CaretMarker color="#F0F0F1"/>
10+
<VRuler color="#E0E0E5"/>
11+
12+
<FoldLine color="#A0A0A0" bgcolor="#FFFFFF"/>
13+
<FoldMarker color="Black" bgcolor="#FFFFFF"/>
14+
<SelectedFoldLine color="Black" bgcolor="#FFFFFF"/>
15+
16+
<EOLMarkers color="#CACAD2"/>
17+
<SpaceMarkers color="#B6B6C0"/>
18+
<TabMarkers color="#B6B6C0"/>
19+
<InvalidLines color="#B6B6C0"/>
20+
</Environment>
21+
22+
<Properties>
23+
<Property name="LineComment" value="%%"/>
24+
</Properties>
25+
26+
<Digits name="Digits" color="Teal"/>
27+
28+
<RuleSets>
29+
<RuleSet ignorecase="true">
30+
31+
<Delimiters>()[]{},:.@`=;+-*/%~ &amp;|^&gt;&lt;</Delimiters>
32+
33+
<Span name="LineComment" stopateol="true" color="Green" bold="false" italic="false">
34+
<Begin>%%</Begin>
35+
</Span>
36+
37+
<Span name="String" stopateol="true" color="Maroon" bold="false" italic="false" escapecharacter="\">
38+
<Begin>"</Begin>
39+
<End>"</End>
40+
</Span>
41+
42+
<KeyWords name="Keywords" color="Blue" bold="false" italic ="false">
43+
<Key word="graph"/>
44+
<Key word="flowchart"/>
45+
<Key word="sequenceDiagram"/>
46+
<Key word="classDiagram"/>
47+
<Key word="stateDiagram"/>
48+
<Key word="stateDiagram-v2"/>
49+
<Key word="erDiagram"/>
50+
<Key word="gantt"/>
51+
<Key word="pie"/>
52+
<Key word="journey"/>
53+
<Key word="gitGraph"/>
54+
<Key word="mindmap"/>
55+
<Key word="timeline"/>
56+
<Key word="C4Context"/>
57+
<Key word="C4Container"/>
58+
<Key word="C4Component"/>
59+
<Key word="C4Dynamic"/>
60+
<Key word="C4Deployment"/>
61+
<Key word="subgraph"/>
62+
<Key word="end"/>
63+
<Key word="direction"/>
64+
<Key word="classDef"/>
65+
<Key word="class"/>
66+
<Key word="linkStyle"/>
67+
<Key word="style"/>
68+
<Key word="note"/>
69+
<Key word="participant"/>
70+
<Key word="actor"/>
71+
<Key word="loop"/>
72+
<Key word="alt"/>
73+
<Key word="opt"/>
74+
<Key word="par"/>
75+
<Key word="rect"/>
76+
<Key word="critical"/>
77+
<Key word="break"/>
78+
<Key word="activate"/>
79+
<Key word="deactivate"/>
80+
<Key word="title"/>
81+
<Key word="section"/>
82+
<Key word="dateFormat"/>
83+
<Key word="axisFormat"/>
84+
</KeyWords>
85+
</RuleSet>
86+
</RuleSets>
87+
</SyntaxDefinition>

0 commit comments

Comments
 (0)