Damson/assets/syntax/xhtml.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
6.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="XHTML" version="1" kateversion="5.79" section="Markup" extensions="*.xht;*.xhtml" mimetype="text/html" author="Jonathan Poelen ([email protected])" license="MIT"><highlighting><contexts><context name="Start" attribute="Error"><IncludeRules context="FindText##XML" includeAttrib="1"/><WordDetect String="&lt;style" context="SpecialElement" lookAhead="1"/><WordDetect String="&lt;script" context="SpecialElement" lookAhead="1"/><IncludeRules context="FindElement##XML"/></context><context name="JS_Content" attribute="Error"><StringDetect String="//" attribute="Comment" context="#pop!JS_Comment1InXML"/><StringDetect String="/*" attribute="Comment" context="#pop!JS_Comment2InXML" beginRegion="comment"/><StringDetect String="&lt;![CDATA[" attribute="CDATA" context="#pop!JS_ContentCDATA" beginRegion="cdata"/><IncludeRules context="FindXMLInSpecialElement"/><IncludeRules context="Normal##JavaScript" includeAttrib="1"/></context><context name="FindInComment" attribute="Comment"><DetectSpaces/><IncludeRules context="##Comments"/><DetectIdentifier/></context><context name="FindXMLInSpecialElement" attribute="Error"><IncludeRules context="FindComment##XML"/><IncludeRules context="FindEntityRefs##XML"/><DetectChar char="&lt;" context="EndElement" endRegion="element" lookAhead="1"/><DetectChar char="&amp;" attribute="Error"/></context><context name="CSS_Content" attribute="Error"><StringDetect String="&lt;![CDATA[" attribute="CDATA" context="#pop!CSS_ContentCDATA" beginRegion="cdata"/><IncludeRules context="FindXMLInSpecialElement"/><StringDetect String="/*" attribute="Comment" context="#pop!CSS_CommentInXML" beginRegion="comment"/><IncludeRules context="##CSS" includeAttrib="1"/></context><context name="CSS_CommentInXML" attribute="Comment"><StringDetect String="*/" attribute="Comment" context="#pop!CSS_Content" endRegion="comment"/><IncludeRules context="FindInComment"/><StringDetect String="&lt;![CDATA[" attribute="CDATA" context="CSS_CommentCDATA" beginRegion="cdata"/><IncludeRules context="FindXMLInSpecialElement"/></context><context name="JS_Comment2InXML" attribute="Comment"><StringDetect String="*/" attribute="Comment" context="#pop!JS_Content" endRegion="comment"/><IncludeRules context="FindInComment"/><StringDetect String="&lt;![CDATA[" attribute="CDATA" context="JS_Comment2CDATA" beginRegion="cdata"/><IncludeRules context="FindXMLInSpecialElement"/></context><context name="CSS_CommentCDATA" attribute="Comment"><StringDetect String="*/" attribute="Comment" context="#pop#pop!CSS_ContentCDATA" endRegion="comment"/><IncludeRules context="FindInComment"/><StringDetect String="]]>" attribute="CDATA" context="#pop#pop!CSS_CommentInXML" endRegion="cdata"/></context><context name="CSS_ContentCDATA" attribute="Error"><StringDetect String="/*" attribute="Comment" context="CSS_CommentCDATA" beginRegion="comment"/><IncludeRules context="##CSS" includeAttrib="1"/><StringDetect String="]]>" attribute="CDATA" context="#pop!CSS_Content" endRegion="cdata"/></context><context name="JS_Comment1CDATA" attribute="Comment" lineEndContext="#pop#pop!JS_Content"><IncludeRules context="FindInComment"/><StringDetect String="]]>" attribute="CDATA" context="#pop#pop!JS_Content" endRegion="cdata"/></context><context name="JS_Comment1InXML" attribute="Comment" lineEndContext="#pop!JS_Content"><IncludeRules context="FindInComment"/><StringDetect String="&lt;![CDATA[" attribute="CDATA" context="JS_Comment1CDATA" beginRegion="cdata"/><IncludeRules context="FindXMLInSpecialElement"/></context><context name="JS_Comment2CDATA" attribute="Comment"><StringDetect String="*/" attribute="Comment" context="#pop#pop!JS_ContentCDATA" endRegion="comment"/><IncludeRules context="FindInComment"/><StringDetect String="]]>" attribute="CDATA" context="#pop#pop!JS_Comment2InXML" endRegion="cdata"/></context><context name="JS_ContentCDATA" attribute="Error"><StringDetect String="//" attribute="Comment" context="JS_Comment1CDATA" beginRegion="comment"/><StringDetect String="/*" attribute="Comment" context="JS_Comment2CDATA" beginRegion="comment"/><StringDetect String="]]>" attribute="CDATA" context="#pop!JS_Content" endRegion="cdata"/><IncludeRules context="Normal##JavaScript" includeAttrib="1"/></context><context name="SpecialElement" attribute="Error"><DetectChar char="&lt;" attribute="Element Symbols" beginRegion="element"/><StringDetect String="script" attribute="Element" context="#pop!JS_Element"/><StringDetect String="style" attribute="Element" context="#pop!CSS_Element"/></context><context name="SpecialEndElement" attribute="Error"><StringDetect String=">" attribute="Element Symbols" context="#pop#pop#pop"/><StringDetect String="&lt;/" attribute="Element Symbols" endRegion="element"/><DetectIdentifier attribute="Element"/></context><context name="CSS_Element" attribute="Error" fallthroughContext="CSS_ElementError"><DetectChar char=">" attribute="Element Symbols" context="#pop!CSS_Content"/><StringDetect String="/>" attribute="Element Symbols" context="#pop" endRegion="element"/><IncludeRules context="Element##XML" includeAttrib="1"/></context><context name="CSS_ElementError" attribute="Error"><StringDetect String="/*" attribute="Error" context="#pop#pop!CSS_CommentInXML" beginRegion="comment"/><RegExpr String="[-\w.:_=]+|[^-\w.:_=/&lt;>\s]+[-\w.:_]*|/>|[^&lt;]" attribute="Error" context="#pop#pop!CSS_Content"/><IncludeRules context="ElementCommonError##XML"/></context><context name="EndElement" attribute="Error" fallthroughContext="#pop#pop"><WordDetect String="&lt;/style>" context="SpecialEndElement" lookAhead="1"/><WordDetect String="&lt;/script>" context="SpecialEndElement" lookAhead="1"/></context><context name="JS_Element" attribute="Error" fallthroughContext="JS_ElementError"><DetectChar char=">" attribute="Element Symbols" context="#pop!JS_Content"/><StringDetect String="/>" attribute="Element Symbols" context="#pop" endRegion="element"/><IncludeRules context="Element##XML" includeAttrib="1"/></context><context name="JS_ElementError" attribute="Error"><StringDetect String="//" attribute="Error" context="#pop#pop!JS_Comment1InXML"/><StringDetect String="/*" attribute="Error" context="#pop#pop!JS_Comment2InXML" beginRegion="comment"/><RegExpr String="[-\w.:_=]+|[^-\w.:_=/&lt;>\s]+[-\w.:_]*|/>|[^&lt;]" attribute="Error" context="#pop#pop!JS_Content"/><IncludeRules context="ElementCommonError##XML"/></context></contexts><itemDatas><itemData name="Comment" defStyleNum="dsComment"/><itemData name="CDATA" defStyleNum="dsBaseN" bold="1" italic="0" spellChecking="0"/><itemData name="Element" defStyleNum="dsKeyword" spellChecking="0"/><itemData name="Element Symbols" defStyleNum="dsDataType" spellChecking="0"/><itemData name="Error" defStyleNum="dsError" spellChecking="0"/></itemDatas></highlighting><general><comments><comment name="multiLine" start="&lt;!--" end="-->" region="comment"/></comments></general></language>