Warning, /frameworks/syntax-highlighting/data/syntax/html.xml is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" encoding="UTF-8"?> 0002 <!DOCTYPE language 0003 [ 0004 <!ENTITY name "[A-Za-z_:][\w.:_-]*"> 0005 <!ENTITY attributeName "[A-Za-z_:*#\(\[][\)\]\w.:_-]*"> 0006 <!ENTITY entref "&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);"> 0007 ]> 0008 <language name="HTML" version="15" kateversion="5.53" section="Markup" extensions="*.htm;*.html;*.shtml;*.shtm;*.aspx" mimetype="text/html" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10"> 0009 0010 <highlighting> 0011 <contexts> 0012 <context name="Start" attribute="Normal Text" lineEndContext="#stay"> 0013 <IncludeRules context="FindHTML" /> 0014 </context> 0015 0016 <context name="FindHTML" attribute="Normal Text" lineEndContext="#stay"> 0017 <DetectSpaces/> 0018 <DetectIdentifier/> 0019 <StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" /> 0020 <StringDetect attribute="CDATA" context="CDATA" String="<![CDATA[" beginRegion="cdata" /> 0021 <RegExpr attribute="Doctype" context="Doctype" String="<!DOCTYPE\s+" insensitive="true" beginRegion="doctype" /> 0022 <RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:-]*" beginRegion="pi" /> 0023 <IncludeRules context="FindSpecialHTMLTags" /> 0024 <IncludeRules context="FindHTMLTags" /> 0025 <!-- as long as kde gives DTDs the text/html mimetype--><IncludeRules context="FindDTDRules" /> 0026 <IncludeRules context="FindEntityRefs" /> 0027 </context> 0028 0029 <!-- This allows you to insert HTML tags in other syntax definitions --> 0030 <context name="FindSpecialHTMLTags" attribute="Normal Text" lineEndContext="#stay"> 0031 <RegExpr attribute="Element" context="CSS" String="<style\b" insensitive="true" beginRegion="style" /> 0032 <RegExpr attribute="Element" context="JS" String="<script\b" insensitive="true" beginRegion="script" /> 0033 </context> 0034 0035 <context name="FindHTMLTags" attribute="Normal Text" lineEndContext="#stay"> 0036 <WordDetect attribute="Element" context="El Open" String="<pre" insensitive="true" beginRegion="pre" /> 0037 <WordDetect attribute="Element" context="El Open" String="<div" insensitive="true" beginRegion="div" /> 0038 <WordDetect attribute="Element" context="El Open" String="<table" insensitive="true" beginRegion="table" /> 0039 <WordDetect attribute="Element" context="El Open" String="<ul" insensitive="true" beginRegion="ul" /> 0040 <WordDetect attribute="Element" context="El Open" String="<ol" insensitive="true" beginRegion="ol" /> 0041 <WordDetect attribute="Element" context="El Open" String="<dl" insensitive="true" beginRegion="dl" /> 0042 <WordDetect attribute="Element" context="El Open" String="<article" insensitive="true" beginRegion="article" /> 0043 <WordDetect attribute="Element" context="El Open" String="<aside" insensitive="true" beginRegion="aside" /> 0044 <WordDetect attribute="Element" context="El Open" String="<details" insensitive="true" beginRegion="details" /> 0045 <WordDetect attribute="Element" context="El Open" String="<figure" insensitive="true" beginRegion="figure" /> 0046 <WordDetect attribute="Element" context="El Open" String="<footer" insensitive="true" beginRegion="footer" /> 0047 <WordDetect attribute="Element" context="El Open" String="<header" insensitive="true" beginRegion="header" /> 0048 <WordDetect attribute="Element" context="El Open" String="<main" insensitive="true" beginRegion="main" /> 0049 <WordDetect attribute="Element" context="El Open" String="<nav" insensitive="true" beginRegion="nav" /> 0050 <WordDetect attribute="Element" context="El Open" String="<section" insensitive="true" beginRegion="section" /> 0051 <RegExpr attribute="Element" context="El Open" String="<&name;" /> 0052 <WordDetect attribute="Element" context="El Close" String="</pre" insensitive="true" endRegion="pre" /> 0053 <WordDetect attribute="Element" context="El Close" String="</div" insensitive="true" endRegion="div" /> 0054 <WordDetect attribute="Element" context="El Close" String="</table" insensitive="true" endRegion="table" /> 0055 <WordDetect attribute="Element" context="El Close" String="</ul" insensitive="true" endRegion="ul" /> 0056 <WordDetect attribute="Element" context="El Close" String="</ol" insensitive="true" endRegion="ol" /> 0057 <WordDetect attribute="Element" context="El Close" String="</dl" insensitive="true" endRegion="dl" /> 0058 <WordDetect attribute="Element" context="El Close" String="</article" insensitive="true" endRegion="article" /> 0059 <WordDetect attribute="Element" context="El Close" String="</aside" insensitive="true" endRegion="aside" /> 0060 <WordDetect attribute="Element" context="El Close" String="</details" insensitive="true" endRegion="details" /> 0061 <WordDetect attribute="Element" context="El Close" String="</figure" insensitive="true" endRegion="figure" /> 0062 <WordDetect attribute="Element" context="El Close" String="</footer" insensitive="true" endRegion="footer" /> 0063 <WordDetect attribute="Element" context="El Close" String="</header" insensitive="true" endRegion="header" /> 0064 <WordDetect attribute="Element" context="El Close" String="</main" insensitive="true" endRegion="main" /> 0065 <WordDetect attribute="Element" context="El Close" String="</nav" insensitive="true" endRegion="nav" /> 0066 <WordDetect attribute="Element" context="El Close" String="</section" insensitive="true" endRegion="section" /> 0067 <RegExpr attribute="Element" context="El Close" String="</&name;" /> 0068 </context> 0069 0070 <context name="FindEntityRefs" attribute="Other Text" lineEndContext="#stay"> 0071 <RegExpr attribute="EntityRef" context="#stay" String="&entref;" /> 0072 <AnyChar attribute="Error" context="#stay" String="&<" /> 0073 </context> 0074 0075 <context name="FindPEntityRefs" attribute="Other Text" lineEndContext="#stay"> 0076 <RegExpr attribute="EntityRef" context="#stay" String="&entref;" /> 0077 <RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" /> 0078 <AnyChar attribute="Error" context="#stay" String="&%" /> 0079 </context> 0080 0081 <context name="FindAttributes" attribute="Other Text" lineEndContext="#stay"> 0082 <RegExpr attribute="Attribute" context="#stay" String="^&attributeName;|\s+&attributeName;" /> 0083 <DetectChar attribute="Attribute" context="Value" char="=" /> 0084 </context> 0085 0086 <context name="FindDTDRules" attribute="Other Text" lineEndContext="#stay"> 0087 <RegExpr attribute="Doctype" context="Doctype Markupdecl" String="<!(?:ELEMENT|ENTITY|ATTLIST|NOTATION)\b" /> 0088 </context> 0089 0090 0091 <context name="Comment" attribute="Comment" lineEndContext="#stay"> 0092 <DetectSpaces/> 0093 <StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" /> 0094 <IncludeRules context="##Comments" /> 0095 <DetectIdentifier/> 0096 <RegExpr attribute="Error" context="#stay" String="-(?:-(?!->))+" /> 0097 </context> 0098 0099 <context name="CDATA" attribute="Other Text" lineEndContext="#stay"> 0100 <DetectSpaces/> 0101 <DetectIdentifier/> 0102 <StringDetect attribute="CDATA" context="#pop" String="]]>" endRegion="cdata" /> 0103 <StringDetect attribute="EntityRef" context="#stay" String="]]&gt;" /> 0104 </context> 0105 0106 <context name="PI" attribute="Other Text" lineEndContext="#stay"> 0107 <Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1=">" endRegion="pi" /> 0108 </context> 0109 0110 <context name="Doctype" attribute="Other Text" lineEndContext="#stay"> 0111 <DetectChar attribute="Doctype" context="#pop" char=">" endRegion="doctype" /> 0112 <DetectChar attribute="Doctype" context="Doctype Internal Subset" char="[" beginRegion="int_subset" /> 0113 </context> 0114 0115 <context name="Doctype Internal Subset" attribute="Other Text" lineEndContext="#stay"> 0116 <DetectChar attribute="Doctype" context="#pop" char="]" endRegion="int_subset" /> 0117 <IncludeRules context="FindDTDRules" /> 0118 <StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" /> 0119 <RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:-]*" beginRegion="pi" /> 0120 <IncludeRules context="FindPEntityRefs" /> 0121 </context> 0122 0123 <context name="Doctype Markupdecl" attribute="Other Text" lineEndContext="#stay"> 0124 <DetectChar attribute="Doctype" context="#pop" char=">" /> 0125 <DetectChar attribute="Value" context="Doctype Markupdecl DQ" char=""" /> 0126 <DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="'" /> 0127 </context> 0128 0129 <context name="Doctype Markupdecl DQ" attribute="Value" lineEndContext="#stay"> 0130 <DetectChar attribute="Value" context="#pop" char=""" /> 0131 <IncludeRules context="FindPEntityRefs" /> 0132 </context> 0133 0134 <context name="Doctype Markupdecl SQ" attribute="Value" lineEndContext="#stay"> 0135 <DetectChar attribute="Value" context="#pop" char="'" /> 0136 <IncludeRules context="FindPEntityRefs" /> 0137 </context> 0138 0139 <context name="El Open" attribute="Other Text" lineEndContext="#stay"> 0140 <Detect2Chars attribute="Element" context="#pop" char="/" char1=">" /> 0141 <DetectChar attribute="Element" context="#pop" char=">" /> 0142 <IncludeRules context="FindAttributes" /> 0143 <RegExpr attribute="Error" context="#stay" String="\S" /> 0144 </context> 0145 0146 <context name="El Close" attribute="Other Text" lineEndContext="#stay"> 0147 <DetectChar attribute="Element" context="#pop" char=">" /> 0148 <RegExpr attribute="Error" context="#stay" String="\S" /> 0149 </context> 0150 0151 <context name="El Close 2" attribute="Other Text" lineEndContext="#stay"> 0152 <DetectChar attribute="Element" context="#pop#pop#pop" char=">" /> 0153 <RegExpr attribute="Error" context="#stay" String="\S" /> 0154 </context> 0155 0156 <context name="El Close 3" attribute="Other Text" lineEndContext="#stay"> 0157 <DetectChar attribute="Element" context="#pop#pop#pop#pop" char=">" /> 0158 <RegExpr attribute="Error" context="#stay" String="\S" /> 0159 </context> 0160 0161 <context name="CSS" attribute="Other Text" lineEndContext="#stay"> 0162 <Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="style" /> 0163 <DetectChar attribute="Element" context="CSS content" char=">" /> 0164 <IncludeRules context="FindAttributes" /> 0165 <RegExpr attribute="Error" context="#stay" String="\S" /> 0166 </context> 0167 0168 <context name="CSS content" attribute="Other Text" lineEndContext="#stay"> 0169 <RegExpr attribute="Element" context="El Close 2" String="</style\b" insensitive="true" endRegion="style" /> 0170 <IncludeRules context="##CSS" includeAttrib="true"/> 0171 </context> 0172 0173 <context name="JS" attribute="Other Text" lineEndContext="#stay"> 0174 <RegExpr attribute="Attribute" context="Script-Type" String="(?:\s+|^)type(?=\=|\s|$)" insensitive="true"/> 0175 <DetectChar attribute="Element" context="JS content" char=">" /> 0176 <IncludeRules context="DefaultJS" /> 0177 </context> 0178 <context name="DefaultJS" attribute="Other Text" lineEndContext="#stay"> 0179 <Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="script" /> 0180 <IncludeRules context="FindAttributes" /> 0181 <RegExpr attribute="Error" context="#stay" String="\S" /> 0182 </context> 0183 0184 <context name="JS content" attribute="Other Text" lineEndContext="#stay"> 0185 <IncludeRules context="Default JS content"/> 0186 <IncludeRules context="Normal##JavaScript" includeAttrib="true"/> 0187 </context> 0188 <context name="Default JS content" attribute="Other Text" lineEndContext="#stay"> 0189 <RegExpr attribute="Element" context="El Close 2" String="</script\b" insensitive="true" endRegion="script" /> 0190 <RegExpr attribute="Comment" context="JS comment close" String="//(?=.*</script\b)" insensitive="true" /> 0191 </context> 0192 0193 <context name="JS comment close" attribute="Comment" lineEndContext="#pop"> 0194 <RegExpr attribute="Element" context="El Close 3" String="</script\b" insensitive="true" endRegion="script" /> 0195 <DetectSpaces /> 0196 <IncludeRules context="##Comments" /> 0197 </context> 0198 0199 <context name="Value" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="Value NQ"> 0200 <DetectChar attribute="Value" context="Value DQ" char=""" /> 0201 <DetectChar attribute="Value" context="Value SQ" char="'" /> 0202 <DetectSpaces /> 0203 </context> 0204 0205 <context name="Value NQ" attribute="Other Text" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop"> 0206 <IncludeRules context="FindEntityRefs" /> 0207 <RegExpr attribute="Value" context="#stay" String="/(?!>)|[^/><"'\s]" /> 0208 </context> 0209 0210 <context name="Value DQ" attribute="Value" lineEndContext="#stay"> 0211 <DetectChar attribute="Value" context="#pop#pop" char=""" /> 0212 <IncludeRules context="FindEntityRefs" /> 0213 </context> 0214 0215 <context name="Value SQ" attribute="Value" lineEndContext="#stay"> 0216 <DetectChar attribute="Value" context="#pop#pop" char="'" /> 0217 <IncludeRules context="FindEntityRefs" /> 0218 </context> 0219 0220 <!-- Read content from the "type" attribute to change the language to 0221 highlight in the <script> tag. The default language is JavaScript. --> 0222 0223 <context name="Script-Type" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> 0224 <DetectSpaces /> 0225 <DetectChar attribute="Attribute" context="#pop!Script-Type Value" char="=" /> 0226 </context> 0227 <context name="Script-Type Value" attribute="Other Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!Value"> 0228 <DetectSpaces /> 0229 <!-- TypeScript --> 0230 <StringDetect attribute="Value" context="#pop#pop!TypeScript" String=""text/typescript""/> 0231 <StringDetect attribute="Value" context="#pop#pop!TypeScript" String="'text/typescript'"/> 0232 <!-- JSX (JavaScript React) --> 0233 <StringDetect attribute="Value" context="#pop#pop!JSX" String=""text/jsx""/> 0234 <StringDetect attribute="Value" context="#pop#pop!JSX" String="'text/jsx'"/> 0235 <StringDetect attribute="Value" context="#pop#pop!JSX" String=""text/babel""/> 0236 <StringDetect attribute="Value" context="#pop#pop!JSX" String="'text/babel'"/> 0237 <!-- MustacheJS / HandlebarsJS / RactiveJS --> 0238 <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String=""x-tmpl-mustache""/> 0239 <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="'x-tmpl-mustache'"/> 0240 <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String=""text/mustache""/> 0241 <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="'text/mustache'"/> 0242 <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String=""text/x-mustache-template""/> 0243 <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="'text/x-mustache-template'"/> 0244 <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String=""text/x-handlebars-template""/> 0245 <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="'text/x-handlebars-template'"/> 0246 <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String=""text/ractive""/> 0247 <StringDetect attribute="Value" context="#pop#pop!MustacheJS" String="'text/ractive'"/> 0248 <!-- HTML templates --> 0249 <StringDetect attribute="Value" context="#pop#pop!Script HTML template" String=""text/html""/> 0250 <StringDetect attribute="Value" context="#pop#pop!Script HTML template" String="'text/html'"/> 0251 </context> 0252 0253 <context name="JSX" attribute="Other Text" lineEndContext="#stay"> 0254 <DetectChar attribute="Element" context="JSX content" char=">" /> 0255 <IncludeRules context="DefaultJS" /> 0256 </context> 0257 <context name="JSX content" attribute="Other Text" lineEndContext="#stay"> 0258 <IncludeRules context="Default JS content"/> 0259 <IncludeRules context="Normal##JavaScript React (JSX)" includeAttrib="true"/> 0260 </context> 0261 0262 <context name="TypeScript" attribute="Other Text" lineEndContext="#stay"> 0263 <DetectChar attribute="Element" context="TypeScript content" char=">" /> 0264 <IncludeRules context="DefaultJS" /> 0265 </context> 0266 <context name="TypeScript content" attribute="Other Text" lineEndContext="#stay"> 0267 <IncludeRules context="Default JS content"/> 0268 <IncludeRules context="Normal##TypeScript" includeAttrib="true"/> 0269 </context> 0270 0271 <context name="MustacheJS" attribute="Other Text" lineEndContext="#stay"> 0272 <DetectChar attribute="Element" context="MustacheJS content" char=">" /> 0273 <IncludeRules context="DefaultJS" /> 0274 </context> 0275 <context name="MustacheJS content" attribute="Other Text" lineEndContext="#stay"> 0276 <RegExpr attribute="Element" context="El Close 2" String="</script\b" insensitive="true" endRegion="script" /> 0277 <StringDetect attribute="Error" context="#stay" String="<script>" insensitive="true" /> 0278 <RegExpr attribute="Error" context="#stay" String="<script\b" insensitive="true" /> 0279 <IncludeRules context="Base##Mustache/Handlebars (HTML)" includeAttrib="true"/> 0280 </context> 0281 0282 <context name="Script HTML template" attribute="Other Text" lineEndContext="#stay"> 0283 <DetectChar attribute="Element" context="Script HTML template content" char=">" /> 0284 <IncludeRules context="DefaultJS" /> 0285 </context> 0286 <context name="Script HTML template content" attribute="Other Text" lineEndContext="#stay"> 0287 <RegExpr attribute="Element" context="El Close 2" String="</script\b" insensitive="true" endRegion="script" /> 0288 <StringDetect attribute="Error" context="#stay" String="<script>" insensitive="true" /> 0289 <RegExpr attribute="Error" context="#stay" String="<script\b" insensitive="true" /> 0290 <IncludeRules context="FindHTML" /> 0291 </context> 0292 0293 </contexts> 0294 <itemDatas> 0295 <itemData name="Normal Text" defStyleNum="dsNormal" /> 0296 <itemData name="Other Text" defStyleNum="dsNormal" spellChecking="false" /> 0297 <itemData name="Comment" defStyleNum="dsComment" /> 0298 <itemData name="CDATA" defStyleNum="dsBaseN" bold="1" spellChecking="false" /> 0299 <itemData name="Processing Instruction" defStyleNum="dsKeyword" spellChecking="false" /> 0300 <itemData name="Doctype" defStyleNum="dsDataType" bold="1" spellChecking="false" /> 0301 <itemData name="Element" defStyleNum="dsKeyword" spellChecking="false" /> 0302 <itemData name="Attribute" defStyleNum="dsOthers" spellChecking="false" /> 0303 <itemData name="Value" defStyleNum="dsString" spellChecking="false" /> 0304 <itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" /> 0305 <itemData name="PEntityRef" defStyleNum="dsDecVal" spellChecking="false" /> 0306 <itemData name="Error" defStyleNum="dsError" spellChecking="false" /> 0307 </itemDatas> 0308 0309 </highlighting> 0310 <general> 0311 <comments> 0312 <comment name="multiLine" start="<!--" end="-->" region="comment" /> 0313 </comments> 0314 </general> 0315 </language> 0316 <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->