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