Warning, /frameworks/syntax-highlighting/data/syntax/mako.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 entref  "&amp;(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
0006 ]>
0007 <language name="Mako" version="8" kateversion="5.53" section="Markup" extensions="*.mako;*.mak" author="Massimiliano Torromeo (massimiliano.torromeo@gmail.com)" license="LGPL">
0008 
0009 <highlighting>
0010 <list name="flow">
0011         <item>endfor</item>
0012         <item>endif</item>
0013 </list>
0014 <contexts>
0015         <context name="Start" attribute="Normal Text" lineEndContext="#stay">
0016                 <IncludeRules context="FindMako" />
0017                 <IncludeRules context="FindHTML" />
0018         </context>
0019 
0020         <context name="FindMako" attribute="Normal Text" lineEndContext="#stay">
0021                 <RegExpr attribute="MakoKeyword" context="NoMakoHTML" String="&lt;%text(?:\s+[^&gt;]*)?&gt;" beginRegion="nomako" />
0022                 <Detect2Chars attribute="MakoKeyword" context="Mako" char="&lt;" char1="%" />
0023                 <RegExpr attribute="MakoKeyword" context="Mako" String="&lt;/?%" />
0024                 <RegExpr attribute="MakoKeyword" context="MakoOneLiner" String="^\s*% " column="0" />
0025                 <Detect2Chars attribute="MakoKeyword" context="MakoPrint" char="$" char1="{" />
0026         </context>
0027 
0028         <context name="Mako" attribute="Mako" lineEndContext="#stay">
0029                 <RegExpr attribute="MakoKeyword" context="#pop" String="[%/]?&gt;" />
0030                 <IncludeRules context="##Python" includeAttrib="true"/>
0031         </context>
0032 
0033         <context name="MakoOneLiner" attribute="MakoKeyword" lineEndContext="#pop">
0034                 <keyword attribute="Flow Control Keyword" String="flow" context="#stay"/>
0035                 <IncludeRules context="##Python" includeAttrib="true"/>
0036         </context>
0037 
0038         <context name="MakoPrint" attribute="Mako" lineEndContext="#stay">
0039                 <DetectChar attribute="MakoKeyword" context="#pop" char="}" />
0040                 <IncludeRules context="##Python" includeAttrib="true"/>
0041         </context>
0042 
0043         <context name="NoMakoHTML" attribute="Normal Text" lineEndContext="#stay">
0044                 <StringDetect attribute="MakoKeyword" context="#pop" String="&lt;/%text&gt;" endRegion="nomako" />
0045                 <IncludeRules context="##HTML" includeAttrib="true"/>
0046         </context>
0047 
0048         <context name="NoMakoJS" attribute="Normal Text" lineEndContext="#stay">
0049                 <StringDetect attribute="MakoKeyword" context="#pop" String="&lt;/%text&gt;" endRegion="nomako" />
0050                 <IncludeRules context="Normal##JavaScript" includeAttrib="true"/>
0051         </context>
0052 
0053         <context name="FindHTML" attribute="Normal Text" lineEndContext="#stay">
0054                 <DetectSpaces/>
0055                 <DetectIdentifier/>
0056                 <StringDetect attribute="Comment" context="Comment" String="&lt;!--" beginRegion="comment" />
0057                 <StringDetect attribute="CDATA" context="CDATA" String="&lt;![CDATA[" beginRegion="cdata" />
0058                 <RegExpr attribute="Doctype" context="Doctype" String="&lt;!DOCTYPE\s+" beginRegion="doctype" />
0059                 <RegExpr attribute="Processing Instruction" context="PI" String="&lt;\?[\w:-]*" beginRegion="pi" />
0060                 <RegExpr attribute="Element" context="CSS" String="&lt;style\b" insensitive="true" beginRegion="style" />
0061                 <RegExpr attribute="Element" context="JS" String="&lt;script\b" insensitive="true" beginRegion="script" />
0062                 <RegExpr attribute="Element" context="El Open" String="&lt;pre\b" insensitive="true" beginRegion="pre" />
0063                 <RegExpr attribute="Element" context="El Open" String="&lt;div\b" insensitive="true" beginRegion="div" />
0064                 <RegExpr attribute="Element" context="El Open" String="&lt;table\b" insensitive="true" beginRegion="table" />
0065                 <RegExpr attribute="Element" context="El Open" String="&lt;ul\b" insensitive="true" beginRegion="ul" />
0066                 <RegExpr attribute="Element" context="El Open" String="&lt;ol\b" insensitive="true" beginRegion="ol" />
0067                 <RegExpr attribute="Element" context="El Open" String="&lt;dl\b" insensitive="true" beginRegion="dl" />
0068                 <RegExpr attribute="Element" context="El Open" String="&lt;&name;" />
0069                 <RegExpr attribute="Element" context="El Close" String="&lt;/pre\b" insensitive="true" endRegion="pre" />
0070                 <RegExpr attribute="Element" context="El Close" String="&lt;/div\b" insensitive="true" endRegion="div" />
0071                 <RegExpr attribute="Element" context="El Close" String="&lt;/table\b" insensitive="true" endRegion="table" />
0072                 <RegExpr attribute="Element" context="El Close" String="&lt;/ul\b" insensitive="true" endRegion="ul" />
0073                 <RegExpr attribute="Element" context="El Close" String="&lt;/ol\b" insensitive="true" endRegion="ol" />
0074                 <RegExpr attribute="Element" context="El Close" String="&lt;/dl\b" insensitive="true" endRegion="dl" />
0075                 <RegExpr attribute="Element" context="El Close" String="&lt;/&name;" />
0076                 <!-- as long as kde gives DTDs the text/html mimetype--><IncludeRules context="FindDTDRules" />
0077                 <IncludeRules context="FindEntityRefs" />
0078         </context>
0079 
0080         <context name="FindEntityRefs" attribute="Normal Text" lineEndContext="#stay">
0081                 <RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
0082                 <AnyChar attribute="Error" context="#stay" String="&amp;&lt;" />
0083         </context>
0084 
0085         <context name="FindPEntityRefs" attribute="Normal Text" lineEndContext="#stay">
0086                 <RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
0087                 <RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" />
0088                 <AnyChar attribute="Error" context="#stay" String="&amp;%" />
0089         </context>
0090 
0091         <context name="FindAttributes" attribute="Normal Text" lineEndContext="#stay">
0092                 <!--<RegExpr attribute="Attribute" context="#stay" String="&name;" column="0"/>
0093                 <RegExpr attribute="Attribute" context="#stay" String="\s+&name;" />-->
0094                 <RegExpr attribute="Attribute" context="#stay" String="&name;" />
0095                 <DetectChar attribute="Attribute" context="Value" char="=" />
0096         </context>
0097 
0098         <context name="FindDTDRules" attribute="Normal Text" lineEndContext="#stay">
0099                 <RegExpr attribute="Doctype" context="Doctype Markupdecl" String="&lt;!(ELEMENT|ENTITY|ATTLIST|NOTATION)\b" />
0100         </context>
0101 
0102         <context name="Comment" attribute="Comment" lineEndContext="#stay">
0103                 <DetectSpaces/>
0104                 <IncludeRules context="##Comments" />
0105                 <DetectIdentifier/>
0106                 <StringDetect attribute="Comment" context="#pop" String="--&gt;" endRegion="comment" />
0107                 <RegExpr attribute="Error" context="#stay" String="-(-(?!-&gt;))+" />
0108         </context>
0109 
0110         <context name="CDATA" attribute="Normal Text" lineEndContext="#stay">
0111                 <DetectSpaces/>
0112                 <DetectIdentifier/>
0113                 <StringDetect attribute="CDATA" context="#pop" String="]]&gt;" endRegion="cdata" />
0114                 <StringDetect attribute="EntityRef" context="#stay" String="]]&amp;gt;" />
0115         </context>
0116 
0117         <context name="PI" attribute="Normal Text" lineEndContext="#stay">
0118                 <Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1="&gt;" endRegion="pi" />
0119         </context>
0120 
0121         <context name="Doctype" attribute="Normal Text" lineEndContext="#stay">
0122                 <DetectChar attribute="Doctype" context="#pop" char="&gt;" endRegion="doctype" />
0123                 <DetectChar attribute="Doctype" context="Doctype Internal Subset" char="[" beginRegion="int_subset" />
0124         </context>
0125 
0126         <context name="Doctype Internal Subset" attribute="Normal Text" lineEndContext="#stay">
0127                 <DetectChar attribute="Doctype" context="#pop" char="]" endRegion="int_subset" />
0128                 <IncludeRules context="FindDTDRules" />
0129                 <StringDetect attribute="Comment" context="Comment" String="&lt;!--" beginRegion="comment" />
0130                 <RegExpr attribute="Processing Instruction" context="PI" String="&lt;\?[\w:-]*" beginRegion="pi" />
0131                 <IncludeRules context="FindPEntityRefs" />
0132         </context>
0133 
0134         <context name="Doctype Markupdecl" attribute="Normal Text" lineEndContext="#stay">
0135                 <DetectChar attribute="Doctype" context="#pop" char="&gt;" />
0136                 <DetectChar attribute="Value" context="Doctype Markupdecl DQ" char="&quot;" />
0137                 <DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="&apos;" />
0138         </context>
0139 
0140         <context name="Doctype Markupdecl DQ" attribute="Value" lineEndContext="#stay">
0141                 <DetectChar attribute="Value" context="#pop" char="&quot;" />
0142                 <IncludeRules context="FindPEntityRefs" />
0143         </context>
0144 
0145         <context name="Doctype Markupdecl SQ" attribute="Value" lineEndContext="#stay">
0146                 <DetectChar attribute="Value" context="#pop" char="&apos;" />
0147                 <IncludeRules context="FindPEntityRefs" />
0148         </context>
0149 
0150         <context name="El Open" attribute="Normal Text" lineEndContext="#stay">
0151                 <Detect2Chars attribute="Element" context="#pop" char="/" char1="&gt;" />
0152                 <DetectChar attribute="Element" context="#pop" char="&gt;" />
0153                 <IncludeRules context="FindAttributes" />
0154                 <IncludeRules context="FindMako" />
0155         </context>
0156 
0157         <context name="El Close" attribute="Normal Text" lineEndContext="#stay">
0158                 <DetectChar attribute="Element" context="#pop" char="&gt;" />
0159                 <RegExpr attribute="Error" context="#stay" String="\S" />
0160         </context>
0161 
0162         <context name="El Close 2" attribute="Normal Text" lineEndContext="#stay">
0163                 <DetectChar attribute="Element" context="#pop#pop#pop" char="&gt;" />
0164                 <RegExpr attribute="Error" context="#stay" String="\S" />
0165         </context>
0166 
0167         <context name="El Close 3" attribute="Normal Text" lineEndContext="#stay">
0168                 <DetectChar attribute="Element" context="#pop#pop#pop#pop" char="&gt;" />
0169                 <RegExpr attribute="Error" context="#stay" String="\S" />
0170         </context>
0171 
0172         <context name="CSS" attribute="Normal Text" lineEndContext="#stay">
0173                 <Detect2Chars attribute="Element" context="#pop" char="/" char1="&gt;" endRegion="style" />
0174                 <DetectChar attribute="Element" context="CSS content" char="&gt;" />
0175                 <RegExpr attribute="Error" context="#stay" String="\S" />
0176         </context>
0177 
0178         <context name="CSS content" attribute="Normal Text" lineEndContext="#stay">
0179                 <RegExpr attribute="Element" context="El Close 2" String="&lt;/style\b" insensitive="true" endRegion="style" />
0180                 <IncludeRules context="##CSS" includeAttrib="true"/>
0181         </context>
0182 
0183         <context name="JS" attribute="Normal Text" lineEndContext="#stay">
0184                 <Detect2Chars attribute="Element" context="#pop" char="/" char1="&gt;" endRegion="script" />
0185                 <DetectChar attribute="Element" context="JS content" char="&gt;" />
0186                 <IncludeRules context="FindAttributes" />
0187                 <RegExpr attribute="Error" context="#stay" String="\S" />
0188         </context>
0189 
0190         <context name="JS content" attribute="Normal Text" lineEndContext="#stay">
0191                 <RegExpr attribute="Element" context="El Close 2" String="&lt;/script\b" insensitive="true" endRegion="script" />
0192                 <RegExpr attribute="Comment" context="JS comment close" String="//(?=.*&lt;/script\b)" insensitive="true" />
0193                 <RegExpr attribute="MakoKeyword" context="NoMakoJS" String="&lt;%text(?:\s+[^&gt;]*)?&gt;" beginRegion="nomako" />
0194                 <IncludeRules context="FindMako" />
0195                 <IncludeRules context="Normal##JavaScript" includeAttrib="true"/>
0196         </context>
0197 
0198         <context name="JS comment close" attribute="Comment" lineEndContext="#pop">
0199                 <RegExpr attribute="Element" context="El Close 3" String="&lt;/script\b" insensitive="true" endRegion="script" />
0200                 <DetectSpaces />
0201                 <IncludeRules context="##Comments" />
0202         </context>
0203 
0204         <context name="Value" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="Value NQ">
0205                 <DetectChar attribute="Value" context="Value DQ" char="&quot;" />
0206                 <DetectChar attribute="Value" context="Value SQ" char="&apos;" />
0207                 <DetectSpaces />
0208         </context>
0209 
0210         <context name="Value NQ" attribute="Normal Text" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
0211                 <IncludeRules context="FindEntityRefs" />
0212                 <RegExpr attribute="Value" context="#stay" String="/(?!&gt;)|[^/&gt;&lt;&quot;&apos;\s]" />
0213         </context>
0214 
0215         <context name="Value DQ" attribute="Value" lineEndContext="#stay">
0216                 <DetectChar attribute="Value" context="#pop#pop" char="&quot;" />
0217                 <IncludeRules context="FindEntityRefs" />
0218                 <IncludeRules context="FindMako" />
0219         </context>
0220 
0221         <context name="Value SQ" attribute="Value" lineEndContext="#stay">
0222                 <DetectChar attribute="Value" context="#pop#pop" char="&apos;" />
0223                 <IncludeRules context="FindEntityRefs" />
0224                 <IncludeRules context="FindMako" />
0225         </context>
0226 
0227 </contexts>
0228 <itemDatas>
0229   <itemData name="Normal Text" defStyleNum="dsNormal" />
0230   <itemData name="Comment" defStyleNum="dsComment" />
0231   <itemData name="CDATA" defStyleNum="dsBaseN" bold="1" />
0232   <itemData name="Processing Instruction" defStyleNum="dsKeyword" />
0233   <itemData name="Doctype" defStyleNum="dsDataType" bold="1" />
0234   <itemData name="Element" defStyleNum="dsKeyword" />
0235   <itemData name="Flow Control Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
0236   <itemData name="Attribute" defStyleNum="dsOthers" />
0237   <itemData name="Value" defStyleNum="dsString" />
0238   <itemData name="EntityRef" defStyleNum="dsDecVal" />
0239   <itemData name="PEntityRef" defStyleNum="dsDecVal" />
0240   <itemData name="Error" defStyleNum="dsError" />
0241   <itemData name="Mako" defStyleNum="dsDataType" />
0242   <itemData name="MakoKeyword" defStyleNum="dsDataType" bold="1" />
0243 </itemDatas>
0244 
0245 </highlighting>
0246 <general>
0247   <comments>
0248     <comment name="singleLine" start="#" position="afterwhitespace"/>
0249         <comment name="multiLine" start="&lt;!--" end="--&gt;" region="comment"/>
0250   </comments>
0251 </general>
0252 </language>
0253 <!-- kate: replace-tabs off; -->