-
Notifications
You must be signed in to change notification settings - Fork 0
/
jinja2.xml
132 lines (112 loc) · 4.58 KB
/
jinja2.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="Jinja2" version="1.0" kateversion="2.4" section="Markup" extensions="*.jinja;*.jinja2;*.j2" author="Per Myren (progrper@gmail.com)" license="LGPL" priority="5">
<highlighting>
<list name="keywords">
<item>extends</item>
<item>include</item>
<item>import</item>
<item>set</item>
<item>from</item>
<item>in</item>
<item>as</item>
<item>is</item>
<item>scoped</item>
<item>not</item>
<item>recursive</item>
<item>ignore</item>
<item>missing</item>
<item>with</item>
<item>without</item>
<item>context</item>
<item>pluralize</item>
<item>do</item>
<item>continue</item>
<item>break</item>
</list>
<list name="blocktags">
<item>for</item>
<item>block</item>
<item>if</item>
<item>else</item>
<item>elif</item>
<item>macro</item>
<item>filter</item>
<item>call</item>
<item>raw</item>
<item>trans</item>
<item>with</item>
<item>autoescape</item>
</list>
<list name="blockdividers">
<item>else</item>
<item>elif</item>
</list>
<list name="endblocktags">
<item>end</item> <!-- jinja-simplesyntax extension -->
<item>endfor</item>
<item>endblock</item>
<item>endif</item>
<item>endmacro</item>
<item>endfilter</item>
<item>endcall</item>
<item>endraw</item>
<item>endtrans</item>
<item>endwith</item>
<item>endautoescape</item>
</list>
<contexts>
<context name="Start" attribute="Normal Text" lineEndContext="#stay">
<IncludeRules context="FindJinja" />
</context>
<context name="FindJinja" attribute="Normal Text" lineEndContext="#stay">
<Detect2Chars attribute="Print delimiter" context="PrintExpression" char="{" char1="{" />
<Detect2Chars attribute="Block delimiter" context="Block" char="{" char1="%" />
<DetectChar char="%" attribute="Line statement prefix" firstNonSpace="true" context="LineStatement" />
<Detect2Chars attribute="Comment delimiter" context="JinjaSingleLineComment" char="#" char1="#" />
<Detect2Chars attribute="Comment delimiter" context="JinjaComment" char="{" char1="#" beginRegion="jinjacomment" />
</context>
<context name="PrintExpression" attribute="Normal Text" lineEndContext="#stay">
<Detect2Chars attribute="Print delimiter" context="#pop#pop" char="}" char1="}" />
<DetectChar attribute="Filter separator" context="#stay" char="|" />
<IncludeRules context="##Python" />
</context>
<context name="Block" attribute="Normal Text" lineEndContext="#stay">
<Detect2Chars attribute="Block delimiter" context="#pop#pop" char="%" char1="}" />
<keyword context="#stay" attribute="Keyword" String="keywords" />
<keyword context="#stay" attribute="Keyword" String="blockdividers" endRegion="jinjablock" beginRegion="jinjablock" />
<keyword context="#stay" attribute="Keyword" String="blocktags" beginRegion="jinjablock" />
<keyword context="#stay" attribute="Keyword" String="endblocktags" endRegion="jinjablock" />
<IncludeRules context="##Python" />
</context>
<context name="LineStatement" attribute="Normal Text" lineEndContext="#pop#pop">
<keyword context="#stay" attribute="Keyword" String="keywords" />
<keyword context="#stay" attribute="Keyword" String="blockdividers" endRegion="jinjablock" beginRegion="jinjablock" />
<keyword context="#stay" attribute="Keyword" String="blocktags" beginRegion="jinjablock" />
<keyword context="#stay" attribute="Keyword" String="endblocktags" endRegion="jinjablock" />
<IncludeRules context="##Python" />
</context>
<context name="JinjaComment" attribute="Comment" lineEndContext="#stay">
<Detect2Chars attribute="Comment delimiter" context="#pop#pop" char="#" char1="}" endRegion="jinjacomment" />
</context>
<context name="JinjaSingleLineComment" attribute="Comment" lineEndContext="#pop#pop">
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" />
<itemData name="Block delimiter" defStyleNum="dsOthers" />
<itemData name="Print delimiter" defStyleNum="dsOthers" />
<itemData name="Filter separator" defStyleNum="dsOthers" />
<itemData name="Line statement prefix" defStyleNum="dsOthers" />
<itemData name="Keyword" defStyleNum="dsKeyword" />
<itemData name="Comment delimiter" defStyleNum="dsComment" />
<itemData name="Comment" defStyleNum="dsComment" />
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="##" />
<comment name="multiLine" start="{#" end="#}" region="jinjacomment" />
</comments>
</general>
</language>