Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/html.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd" | 2 | <!DOCTYPE language SYSTEM "language.dtd" | ||
3 | [ | 3 | [ | ||
4 | <!ENTITY name "[A-Za-z_:][\w.:_-]*"> | 4 | <!ENTITY name "[A-Za-z_:][\w.:_-]*"> | ||
5 | <!ENTITY attributeName "[A-Za-z_:*#\(\[][\)\]\w.:_-]*"> | 5 | <!ENTITY attributeName "[A-Za-z_:*#\(\[][\)\]\w.:_-]*"> | ||
6 | <!ENTITY entref "&(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);"> | 6 | <!ENTITY entref "&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);"> | ||
7 | ]> | 7 | ]> | ||
8 | <language name="HTML" version="10" kateversion="5.53" section="Markup" extensions="*.htm;*.html;*.shtml;*.shtm" mimetype="text/html" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10"> | 8 | <language name="HTML" version="11" kateversion="5.53" section="Markup" extensions="*.htm;*.html;*.shtml;*.shtm" mimetype="text/html" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10"> | ||
9 | 9 | | |||
10 | <highlighting> | 10 | <highlighting> | ||
11 | <contexts> | 11 | <contexts> | ||
12 | <context name="Start" attribute="Normal Text" lineEndContext="#stay"> | 12 | <context name="Start" attribute="Normal Text" lineEndContext="#stay"> | ||
13 | <IncludeRules context="FindHTML" /> | 13 | <IncludeRules context="FindHTML" /> | ||
14 | </context> | 14 | </context> | ||
15 | 15 | | |||
16 | <context name="FindHTML" attribute="Normal Text" lineEndContext="#stay"> | 16 | <context name="FindHTML" attribute="Normal Text" lineEndContext="#stay"> | ||
Show All 11 Lines | |||||
28 | 28 | | |||
29 | <!-- This allows you to insert HTML tags in other syntax definitions --> | 29 | <!-- This allows you to insert HTML tags in other syntax definitions --> | ||
30 | <context name="FindSpecialHTMLTags" attribute="Normal Text" lineEndContext="#stay"> | 30 | <context name="FindSpecialHTMLTags" attribute="Normal Text" lineEndContext="#stay"> | ||
31 | <RegExpr attribute="Element" context="CSS" String="<style\b" insensitive="true" beginRegion="style" /> | 31 | <RegExpr attribute="Element" context="CSS" String="<style\b" insensitive="true" beginRegion="style" /> | ||
32 | <RegExpr attribute="Element" context="JS" String="<script\b" insensitive="true" beginRegion="script" /> | 32 | <RegExpr attribute="Element" context="JS" String="<script\b" insensitive="true" beginRegion="script" /> | ||
33 | </context> | 33 | </context> | ||
34 | 34 | | |||
35 | <context name="FindHTMLTags" attribute="Normal Text" lineEndContext="#stay"> | 35 | <context name="FindHTMLTags" attribute="Normal Text" lineEndContext="#stay"> | ||
36 | <RegExpr attribute="Element" context="El Open" String="<pre\b" insensitive="true" beginRegion="pre" /> | 36 | <WordDetect attribute="Element" context="El Open" String="<pre" insensitive="true" beginRegion="pre" /> | ||
37 | <RegExpr attribute="Element" context="El Open" String="<div\b" insensitive="true" beginRegion="div" /> | 37 | <WordDetect attribute="Element" context="El Open" String="<div" insensitive="true" beginRegion="div" /> | ||
38 | <RegExpr attribute="Element" context="El Open" String="<table\b" insensitive="true" beginRegion="table" /> | 38 | <WordDetect attribute="Element" context="El Open" String="<table" insensitive="true" beginRegion="table" /> | ||
39 | <RegExpr attribute="Element" context="El Open" String="<ul\b" insensitive="true" beginRegion="ul" /> | 39 | <WordDetect attribute="Element" context="El Open" String="<ul" insensitive="true" beginRegion="ul" /> | ||
40 | <RegExpr attribute="Element" context="El Open" String="<ol\b" insensitive="true" beginRegion="ol" /> | 40 | <WordDetect attribute="Element" context="El Open" String="<ol" insensitive="true" beginRegion="ol" /> | ||
41 | <RegExpr attribute="Element" context="El Open" String="<dl\b" insensitive="true" beginRegion="dl" /> | 41 | <WordDetect attribute="Element" context="El Open" String="<dl" insensitive="true" beginRegion="dl" /> | ||
42 | <RegExpr attribute="Element" context="El Open" String="<article\b" insensitive="true" beginRegion="article" /> | 42 | <WordDetect attribute="Element" context="El Open" String="<article" insensitive="true" beginRegion="article" /> | ||
43 | <RegExpr attribute="Element" context="El Open" String="<aside\b" insensitive="true" beginRegion="aside" /> | 43 | <WordDetect attribute="Element" context="El Open" String="<aside" insensitive="true" beginRegion="aside" /> | ||
44 | <RegExpr attribute="Element" context="El Open" String="<details\b" insensitive="true" beginRegion="details" /> | 44 | <WordDetect attribute="Element" context="El Open" String="<details" insensitive="true" beginRegion="details" /> | ||
45 | <RegExpr attribute="Element" context="El Open" String="<figure\b" insensitive="true" beginRegion="figure" /> | 45 | <WordDetect attribute="Element" context="El Open" String="<figure" insensitive="true" beginRegion="figure" /> | ||
46 | <RegExpr attribute="Element" context="El Open" String="<footer\b" insensitive="true" beginRegion="footer" /> | 46 | <WordDetect attribute="Element" context="El Open" String="<footer" insensitive="true" beginRegion="footer" /> | ||
47 | <RegExpr attribute="Element" context="El Open" String="<header\b" insensitive="true" beginRegion="header" /> | 47 | <WordDetect attribute="Element" context="El Open" String="<header" insensitive="true" beginRegion="header" /> | ||
48 | <RegExpr attribute="Element" context="El Open" String="<main\b" insensitive="true" beginRegion="main" /> | 48 | <WordDetect attribute="Element" context="El Open" String="<main" insensitive="true" beginRegion="main" /> | ||
49 | <RegExpr attribute="Element" context="El Open" String="<nav\b" insensitive="true" beginRegion="nav" /> | 49 | <WordDetect attribute="Element" context="El Open" String="<nav" insensitive="true" beginRegion="nav" /> | ||
50 | <RegExpr attribute="Element" context="El Open" String="<section\b" insensitive="true" beginRegion="section" /> | 50 | <WordDetect attribute="Element" context="El Open" String="<section" insensitive="true" beginRegion="section" /> | ||
51 | <RegExpr attribute="Element" context="El Open" String="<&name;" /> | 51 | <RegExpr attribute="Element" context="El Open" String="<&name;" /> | ||
52 | <RegExpr attribute="Element" context="El Close" String="</pre\b" insensitive="true" endRegion="pre" /> | 52 | <WordDetect attribute="Element" context="El Close" String="</pre" insensitive="true" endRegion="pre" /> | ||
53 | <RegExpr attribute="Element" context="El Close" String="</div\b" insensitive="true" endRegion="div" /> | 53 | <WordDetect attribute="Element" context="El Close" String="</div" insensitive="true" endRegion="div" /> | ||
54 | <RegExpr attribute="Element" context="El Close" String="</table\b" insensitive="true" endRegion="table" /> | 54 | <WordDetect attribute="Element" context="El Close" String="</table" insensitive="true" endRegion="table" /> | ||
55 | <RegExpr attribute="Element" context="El Close" String="</ul\b" insensitive="true" endRegion="ul" /> | 55 | <WordDetect attribute="Element" context="El Close" String="</ul" insensitive="true" endRegion="ul" /> | ||
56 | <RegExpr attribute="Element" context="El Close" String="</ol\b" insensitive="true" endRegion="ol" /> | 56 | <WordDetect attribute="Element" context="El Close" String="</ol" insensitive="true" endRegion="ol" /> | ||
57 | <RegExpr attribute="Element" context="El Close" String="</dl\b" insensitive="true" endRegion="dl" /> | 57 | <WordDetect attribute="Element" context="El Close" String="</dl" insensitive="true" endRegion="dl" /> | ||
58 | <RegExpr attribute="Element" context="El Close" String="</article\b" insensitive="true" endRegion="article" /> | 58 | <WordDetect attribute="Element" context="El Close" String="</article" insensitive="true" endRegion="article" /> | ||
59 | <RegExpr attribute="Element" context="El Close" String="</aside\b" insensitive="true" endRegion="aside" /> | 59 | <WordDetect attribute="Element" context="El Close" String="</aside" insensitive="true" endRegion="aside" /> | ||
60 | <RegExpr attribute="Element" context="El Close" String="</details\b" insensitive="true" endRegion="details" /> | 60 | <WordDetect attribute="Element" context="El Close" String="</details" insensitive="true" endRegion="details" /> | ||
61 | <RegExpr attribute="Element" context="El Close" String="</figure\b" insensitive="true" endRegion="figure" /> | 61 | <WordDetect attribute="Element" context="El Close" String="</figure" insensitive="true" endRegion="figure" /> | ||
62 | <RegExpr attribute="Element" context="El Close" String="</footer\b" insensitive="true" endRegion="footer" /> | 62 | <WordDetect attribute="Element" context="El Close" String="</footer" insensitive="true" endRegion="footer" /> | ||
63 | <RegExpr attribute="Element" context="El Close" String="</header\b" insensitive="true" endRegion="header" /> | 63 | <WordDetect attribute="Element" context="El Close" String="</header" insensitive="true" endRegion="header" /> | ||
64 | <RegExpr attribute="Element" context="El Close" String="</main\b" insensitive="true" endRegion="main" /> | 64 | <WordDetect attribute="Element" context="El Close" String="</main" insensitive="true" endRegion="main" /> | ||
65 | <RegExpr attribute="Element" context="El Close" String="</nav\b" insensitive="true" endRegion="nav" /> | 65 | <WordDetect attribute="Element" context="El Close" String="</nav" insensitive="true" endRegion="nav" /> | ||
66 | <RegExpr attribute="Element" context="El Close" String="</section\b" insensitive="true" endRegion="section" /> | 66 | <WordDetect attribute="Element" context="El Close" String="</section" insensitive="true" endRegion="section" /> | ||
67 | <RegExpr attribute="Element" context="El Close" String="</&name;" /> | 67 | <RegExpr attribute="Element" context="El Close" String="</&name;" /> | ||
68 | </context> | 68 | </context> | ||
69 | 69 | | |||
70 | <context name="FindEntityRefs" attribute="Other Text" lineEndContext="#stay"> | 70 | <context name="FindEntityRefs" attribute="Other Text" lineEndContext="#stay"> | ||
71 | <RegExpr attribute="EntityRef" context="#stay" String="&entref;" /> | 71 | <RegExpr attribute="EntityRef" context="#stay" String="&entref;" /> | ||
72 | <AnyChar attribute="Error" context="#stay" String="&<" /> | 72 | <AnyChar attribute="Error" context="#stay" String="&<" /> | ||
73 | </context> | 73 | </context> | ||
74 | 74 | | |||
75 | <context name="FindPEntityRefs" attribute="Other Text" lineEndContext="#stay"> | 75 | <context name="FindPEntityRefs" attribute="Other Text" lineEndContext="#stay"> | ||
76 | <RegExpr attribute="EntityRef" context="#stay" String="&entref;" /> | 76 | <RegExpr attribute="EntityRef" context="#stay" String="&entref;" /> | ||
77 | <RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" /> | 77 | <RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" /> | ||
78 | <AnyChar attribute="Error" context="#stay" String="&%" /> | 78 | <AnyChar attribute="Error" context="#stay" String="&%" /> | ||
79 | </context> | 79 | </context> | ||
80 | 80 | | |||
81 | <context name="FindAttributes" attribute="Other Text" lineEndContext="#stay"> | 81 | <context name="FindAttributes" attribute="Other Text" lineEndContext="#stay"> | ||
82 | <RegExpr attribute="Attribute" context="#stay" String="&attributeName;" column="0"/> | 82 | <RegExpr attribute="Attribute" context="#stay" String="&attributeName;" column="0"/> | ||
83 | <RegExpr attribute="Attribute" context="#stay" String="\s+&attributeName;" /> | 83 | <RegExpr attribute="Attribute" context="#stay" String="\s+&attributeName;" /> | ||
84 | <DetectChar attribute="Attribute" context="Value" char="=" /> | 84 | <DetectChar attribute="Attribute" context="Value" char="=" /> | ||
85 | </context> | 85 | </context> | ||
86 | 86 | | |||
87 | <context name="FindDTDRules" attribute="Other Text" lineEndContext="#stay"> | 87 | <context name="FindDTDRules" attribute="Other Text" lineEndContext="#stay"> | ||
88 | <RegExpr attribute="Doctype" context="Doctype Markupdecl" String="<!(ELEMENT|ENTITY|ATTLIST|NOTATION)\b" /> | 88 | <RegExpr attribute="Doctype" context="Doctype Markupdecl" String="<!(?:ELEMENT|ENTITY|ATTLIST|NOTATION)\b" /> | ||
89 | </context> | 89 | </context> | ||
90 | 90 | | |||
91 | 91 | | |||
92 | <context name="Comment" attribute="Comment" lineEndContext="#stay"> | 92 | <context name="Comment" attribute="Comment" lineEndContext="#stay"> | ||
93 | <DetectSpaces/> | 93 | <DetectSpaces/> | ||
94 | <IncludeRules context="##Alerts" /> | 94 | <IncludeRules context="##Alerts" /> | ||
95 | <DetectIdentifier/> | 95 | <DetectIdentifier/> | ||
96 | <StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" /> | 96 | <StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" /> | ||
97 | <RegExpr attribute="Error" context="#stay" String="-(-(?!->))+" /> | 97 | <RegExpr attribute="Error" context="#stay" String="-(?:-(?!->))+" /> | ||
98 | </context> | 98 | </context> | ||
99 | 99 | | |||
100 | <context name="CDATA" attribute="Other Text" lineEndContext="#stay"> | 100 | <context name="CDATA" attribute="Other Text" lineEndContext="#stay"> | ||
101 | <DetectSpaces/> | 101 | <DetectSpaces/> | ||
102 | <DetectIdentifier/> | 102 | <DetectIdentifier/> | ||
103 | <StringDetect attribute="CDATA" context="#pop" String="]]>" endRegion="cdata" /> | 103 | <StringDetect attribute="CDATA" context="#pop" String="]]>" endRegion="cdata" /> | ||
104 | <StringDetect attribute="EntityRef" context="#stay" String="]]&gt;" /> | 104 | <StringDetect attribute="EntityRef" context="#stay" String="]]&gt;" /> | ||
105 | </context> | 105 | </context> | ||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | |||||
167 | </context> | 167 | </context> | ||
168 | 168 | | |||
169 | <context name="CSS content" attribute="Other Text" lineEndContext="#stay"> | 169 | <context name="CSS content" attribute="Other Text" lineEndContext="#stay"> | ||
170 | <RegExpr attribute="Element" context="El Close 2" String="</style\b" insensitive="true" endRegion="style" /> | 170 | <RegExpr attribute="Element" context="El Close 2" String="</style\b" insensitive="true" endRegion="style" /> | ||
171 | <IncludeRules context="##CSS" includeAttrib="true"/> | 171 | <IncludeRules context="##CSS" includeAttrib="true"/> | ||
172 | </context> | 172 | </context> | ||
173 | 173 | | |||
174 | <context name="JS" attribute="Other Text" lineEndContext="#stay"> | 174 | <context name="JS" attribute="Other Text" lineEndContext="#stay"> | ||
175 | <RegExpr attribute="Attribute" context="Script-Type" String="(\s+|^)type(?=\=|\s|$)" insensitive="true"/> | 175 | <RegExpr attribute="Attribute" context="Script-Type" String="(?:\s+|^)type(?=\=|\s|$)" insensitive="true"/> | ||
176 | <DetectChar attribute="Element" context="JS content" char=">" /> | 176 | <DetectChar attribute="Element" context="JS content" char=">" /> | ||
177 | <IncludeRules context="DefaultJS" /> | 177 | <IncludeRules context="DefaultJS" /> | ||
178 | </context> | 178 | </context> | ||
179 | <context name="DefaultJS" attribute="Other Text" lineEndContext="#stay"> | 179 | <context name="DefaultJS" attribute="Other Text" lineEndContext="#stay"> | ||
180 | <Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="script" /> | 180 | <Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="script" /> | ||
181 | <IncludeRules context="FindAttributes" /> | 181 | <IncludeRules context="FindAttributes" /> | ||
182 | <RegExpr attribute="Error" context="#stay" String="\S" /> | 182 | <RegExpr attribute="Error" context="#stay" String="\S" /> | ||
183 | </context> | 183 | </context> | ||
▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | 295 | <itemDatas> | |||
305 | <itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" /> | 305 | <itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" /> | ||
306 | <itemData name="PEntityRef" defStyleNum="dsDecVal" spellChecking="false" /> | 306 | <itemData name="PEntityRef" defStyleNum="dsDecVal" spellChecking="false" /> | ||
307 | <itemData name="Error" defStyleNum="dsError" spellChecking="false" /> | 307 | <itemData name="Error" defStyleNum="dsError" spellChecking="false" /> | ||
308 | </itemDatas> | 308 | </itemDatas> | ||
309 | 309 | | |||
310 | </highlighting> | 310 | </highlighting> | ||
311 | <general> | 311 | <general> | ||
312 | <comments> | 312 | <comments> | ||
313 | <comment name="multiLine" start="<!--" end="-->" /> | 313 | <comment name="multiLine" start="<!--" end="-->" region="comment" /> | ||
314 | </comments> | 314 | </comments> | ||
315 | </general> | 315 | </general> | ||
316 | </language> | 316 | </language> |