Damson/assets/syntax/mako.xml
astar76 11c1a7808b Build the syntax definitions into the app
Highlighting relied on the syntax-highlighting package, so removing it
left every file uncoloured. The 462 definitions now live in assets/syntax
and are compressed into the binary at build time, unpacked per language
when used. User .xml files still add to or replace them, and the licence
each file declares is recorded in assets/syntax/LICENSES.md.

Also moves files to the trash without needing gio.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 20:35:27 -06:00

1 line
No EOL
10 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="Mako" version="10" kateversion="5.79" section="Markup" extensions="*.mako;*.mak" author="Massimiliano Torromeo ([email protected])" license="LGPL"><highlighting><list name="flow"><item>endfor</item><item>endif</item></list><contexts><context name="Start" attribute="Normal Text"><IncludeRules context="FindMako"/><IncludeRules context="FindHTML"/></context><context name="El Close" attribute="Error"><DetectChar char=">" attribute="Element" context="#pop"/><DetectSpaces attribute="Normal Text"/></context><context name="El Open" attribute="Normal Text"><StringDetect String="/>" attribute="Element" context="#pop"/><DetectChar char=">" attribute="Element" context="#pop"/><IncludeRules context="FindAttributes"/><IncludeRules context="FindMako"/></context><context name="FindMako" attribute="Normal Text"><RegExpr String="&lt;%text(?:\s+[^>]*)?>" attribute="MakoKeyword" context="NoMakoHTML" beginRegion="nomako"/><StringDetect String="&lt;%" attribute="MakoKeyword" context="Mako"/><RegExpr String="&lt;/?%" attribute="MakoKeyword" context="Mako"/><RegExpr String="^\s*% " attribute="MakoKeyword" context="MakoOneLiner" column="0"/><StringDetect String="${" attribute="MakoKeyword" context="MakoPrint"/></context><context name="FindEntityRefs" attribute="Normal Text"><RegExpr String="&amp;(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\w.:_-]*);" attribute="EntityRef"/><AnyChar String="&amp;&lt;" attribute="Error"/></context><context name="FindPEntityRefs" attribute="Normal Text"><RegExpr String="&amp;(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\w.:_-]*);" attribute="EntityRef"/><RegExpr String="%[A-Za-z_:][\w.:_-]*;" attribute="PEntityRef"/><AnyChar String="&amp;%" attribute="Error"/></context><context name="Comment" attribute="Comment"><DetectSpaces/><IncludeRules context="##Comments"/><DetectIdentifier/><StringDetect String="-->" attribute="Comment" context="#pop" endRegion="comment"/></context><context name="FindAttributes" attribute="Normal Text"><RegExpr String="[A-Za-z_:][\w.:_-]*" attribute="Attribute"/><DetectChar char="=" attribute="Attribute" context="Value"/></context><context name="FindDTDRules" attribute="Normal Text"><RegExpr String="&lt;!(ELEMENT|ENTITY|ATTLIST|NOTATION)\b" attribute="Doctype" context="Doctype Markupdecl"/></context><context name="Mako" attribute="Mako"><RegExpr String="[%/]?>" attribute="MakoKeyword" context="#pop"/><IncludeRules context="##Python" includeAttrib="1"/></context><context name="PI" attribute="Normal Text"><StringDetect String="?>" attribute="Processing Instruction" context="#pop" endRegion="pi"/></context><context name="CDATA" attribute="Normal Text"><DetectSpaces/><DetectIdentifier/><StringDetect String="]]>" attribute="CDATA" context="#pop" endRegion="cdata"/></context><context name="CSS" attribute="Error"><StringDetect String="/>" attribute="Element" context="#pop" endRegion="style"/><DetectChar char=">" attribute="Element" context="CSS content"/><DetectSpaces attribute="Normal Text"/></context><context name="CSS content" attribute="Normal Text"><WordDetect String="&lt;/style" attribute="Element" context="#pop#pop!El Close" endRegion="style" insensitive="1"/><IncludeRules context="##CSS" includeAttrib="1"/></context><context name="Doctype" attribute="Normal Text"><DetectChar char=">" attribute="Doctype" context="#pop" endRegion="doctype"/><DetectChar char="[" attribute="Doctype" context="Doctype Internal Subset" beginRegion="int_subset"/></context><context name="Doctype Internal Subset" attribute="Normal Text"><DetectChar char="]" attribute="Doctype" context="#pop" endRegion="int_subset"/><IncludeRules context="FindDTDRules"/><StringDetect String="&lt;!--" attribute="Comment" context="Comment" beginRegion="comment"/><RegExpr String="&lt;\?[\w:-]*" attribute="Processing Instruction" context="PI" beginRegion="pi"/><IncludeRules context="FindPEntityRefs"/></context><context name="Doctype Markupdecl" attribute="Normal Text"><DetectChar char=">" attribute="Doctype" context="#pop"/><DetectChar char='"' attribute="Value" context="Doctype Markupdecl DQ"/><DetectChar char="'" attribute="Value" context="Doctype Markupdecl SQ"/></context><context name="Doctype Markupdecl DQ" attribute="Value"><DetectChar char='"' attribute="Value" context="#pop"/><IncludeRules context="FindPEntityRefs"/></context><context name="Doctype Markupdecl SQ" attribute="Value"><DetectChar char="'" attribute="Value" context="#pop"/><IncludeRules context="FindPEntityRefs"/></context><context name="FindHTML" attribute="Normal Text"><DetectSpaces/><DetectIdentifier/><StringDetect String="&lt;!--" attribute="Comment" context="Comment" beginRegion="comment"/><StringDetect String="&lt;![CDATA[" attribute="CDATA" context="CDATA" beginRegion="cdata"/><WordDetect String="&lt;!DOCTYPE" attribute="Doctype" context="Doctype" beginRegion="doctype"/><RegExpr String="&lt;\?[\w:-]*" attribute="Processing Instruction" context="PI" beginRegion="pi"/><WordDetect String="&lt;style" attribute="Element" context="CSS" beginRegion="style" insensitive="1"/><WordDetect String="&lt;script" attribute="Element" context="JS" beginRegion="script" insensitive="1"/><WordDetect String="&lt;pre" attribute="Element" context="El Open" beginRegion="pre" insensitive="1"/><WordDetect String="&lt;div" attribute="Element" context="El Open" beginRegion="div" insensitive="1"/><WordDetect String="&lt;table" attribute="Element" context="El Open" beginRegion="table" insensitive="1"/><WordDetect String="&lt;ul" attribute="Element" context="El Open" beginRegion="ul" insensitive="1"/><WordDetect String="&lt;ol" attribute="Element" context="El Open" beginRegion="ol" insensitive="1"/><WordDetect String="&lt;dl" attribute="Element" context="El Open" beginRegion="dl" insensitive="1"/><RegExpr String="&lt;[A-Za-z_:][\w.:_-]*" attribute="Element" context="El Open"/><WordDetect String="&lt;/pre" attribute="Element" context="El Close" endRegion="pre" insensitive="1"/><WordDetect String="&lt;/div" attribute="Element" context="El Close" endRegion="div" insensitive="1"/><WordDetect String="&lt;/table" attribute="Element" context="El Close" endRegion="table" insensitive="1"/><WordDetect String="&lt;/ul" attribute="Element" context="El Close" endRegion="ul" insensitive="1"/><WordDetect String="&lt;/ol" attribute="Element" context="El Close" endRegion="ol" insensitive="1"/><WordDetect String="&lt;/dl" attribute="Element" context="El Close" endRegion="dl" insensitive="1"/><RegExpr String="&lt;/[A-Za-z_:][\w.:_-]*" attribute="Element" context="El Close"/><IncludeRules context="FindDTDRules"/><IncludeRules context="FindEntityRefs"/></context><context name="JS" attribute="Error"><StringDetect String="/>" attribute="Element" context="#pop" endRegion="script"/><DetectChar char=">" attribute="Element" context="JS content"/><IncludeRules context="FindAttributes"/><DetectSpaces attribute="Normal Text"/></context><context name="JS comment close" attribute="Comment" lineEndContext="#pop"><WordDetect String="&lt;/script" attribute="Element" context="#pop#pop#pop!El Close" endRegion="script" insensitive="1"/><DetectSpaces/><IncludeRules context="##Comments"/></context><context name="JS content" attribute="Normal Text"><WordDetect String="&lt;/script" attribute="Element" context="#pop#pop!El Close" endRegion="script" insensitive="1"/><RegExpr String="//(?=.*&lt;/script\b)" attribute="Comment" context="JS comment close" insensitive="1"/><RegExpr String="&lt;%text(?:\s+[^>]*)?>" attribute="MakoKeyword" context="NoMakoJS" beginRegion="nomako"/><IncludeRules context="FindMako"/><IncludeRules context="Normal##JavaScript" includeAttrib="1"/></context><context name="MakoOneLiner" attribute="MakoKeyword" lineEndContext="#pop"><keyword String="flow" attribute="Flow Control Keyword"/><IncludeRules context="##Python" includeAttrib="1"/></context><context name="MakoPrint" attribute="Mako"><DetectChar char="}" attribute="MakoKeyword" context="#pop"/><IncludeRules context="##Python" includeAttrib="1"/></context><context name="NoMakoHTML" attribute="Normal Text"><StringDetect String="&lt;/%text>" attribute="MakoKeyword" context="#pop" endRegion="nomako"/><IncludeRules context="##HTML" includeAttrib="1"/></context><context name="NoMakoJS" attribute="Normal Text"><StringDetect String="&lt;/%text>" attribute="MakoKeyword" context="#pop" endRegion="nomako"/><IncludeRules context="Normal##JavaScript" includeAttrib="1"/></context><context name="Value" attribute="Normal Text" fallthroughContext="Value NQ"><DetectChar char='"' attribute="Value" context="Value DQ"/><DetectChar char="'" attribute="Value" context="Value SQ"/><DetectSpaces/></context><context name="Value DQ" attribute="Value"><DetectChar char='"' attribute="Value" context="#pop#pop"/><IncludeRules context="FindEntityRefs"/><IncludeRules context="FindMako"/></context><context name="Value NQ" attribute="Normal Text" fallthroughContext="#pop#pop" lineEndContext="#pop#pop"><IncludeRules context="FindEntityRefs"/><RegExpr String="/(?!>)|[^/>&lt;&#34;'\s]" attribute="Value"/></context><context name="Value SQ" attribute="Value"><DetectChar char="'" attribute="Value" context="#pop#pop"/><IncludeRules context="FindEntityRefs"/><IncludeRules context="FindMako"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="CDATA" defStyleNum="dsBaseN" bold="1"/><itemData name="Processing Instruction" defStyleNum="dsKeyword"/><itemData name="Doctype" defStyleNum="dsDataType" bold="1"/><itemData name="Element" defStyleNum="dsKeyword"/><itemData name="Flow Control Keyword" defStyleNum="dsKeyword" spellChecking="0"/><itemData name="Attribute" defStyleNum="dsOthers"/><itemData name="Value" defStyleNum="dsString"/><itemData name="EntityRef" defStyleNum="dsDecVal"/><itemData name="PEntityRef" defStyleNum="dsDecVal"/><itemData name="Error" defStyleNum="dsError"/><itemData name="Mako" defStyleNum="dsDataType"/><itemData name="MakoKeyword" defStyleNum="dsDataType" bold="1"/></itemDatas></highlighting><general><comments><comment name="singleLine" start="#" position="afterwhitespace"/><comment name="multiLine" start="&lt;!--" end="-->" region="comment"/></comments></general></language>