Damson/assets/syntax/subrip-subtitles.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
14 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="SubRip Subtitles" version="5" kateversion="5.79" section="Other" extensions="*.srt" mimetype="application/x-subrip" priority="9" author="Nibaldo González ([email protected])" license="MIT"><highlighting><contexts><context name="Normal" attribute="Normal Text"><RegExpr String="\d+(?=\s*$)" attribute="Sequence Number" context="FindTime" firstNonSpace="1"/><RegExpr String="(\d\d+(?:\:[0-5]\d){2}[\,\.]\d{3}\s+)(\-\->)(\s+\d\d+(?:\:[0-5]\d){2}[\,\.]\d{3})((?:\s+[XY][12]\:\d+){0,4}\s*$)" context="Time" firstNonSpace="1" lookAhead="1"/><Int attribute="Error" context="TimeError" firstNonSpace="1"/></context><context name="SubtitleCommon" attribute="Subtitle"><RegExpr String="\{\\an\d\}" attribute="Line Alignment Tag"/><RegExpr String="\{(?:\\|Y\:)[^\{\}\s][^\{\}]*\}" attribute="Tag"/><RegExpr String="\\[hN&lt;>\{\}]" attribute="Escape"/><RegExpr String="&lt;[A-Za-z_\:][\w\.\:\-]*(?:\s+[A-Za-z_:\*#\(\[][\)\]\w\.\:_\-]+(?:\s*\=\s*(?:&#34;(?:[^&#34;\\]|\\.)*&#34;|'(?:[^'\\]|\\.)*'|[^>&lt;&#34;'\s]+))?)*\s*/?>|&lt;/[A-Za-z_\:][\w\.\:\-]*\s*>" context="FindHTML" lookAhead="1"/></context><context name="BoldCBracket" attribute="Bold" lineEmptyContext="#pop#pop"><StringDetect String="{/b}" attribute="Format Tag: Bold" context="#pop"/><StringDetect String="{i}" attribute="Format Tag: Bold-Italic" context="BoldCBracket-ItalicCBracket"/><StringDetect String="{u}" attribute="Format Tag: Bold-Underline" context="BoldCBracket-UnderlineCBracket"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Bold"/><IncludeRules context="SubtitleCommon"/></context><context name="BoldThan" attribute="Bold" lineEmptyContext="#pop#pop"><StringDetect String="&lt;/b>" attribute="Format Tag: Bold" context="#pop"/><StringDetect String="&lt;i>" attribute="Format Tag: Bold-Italic" context="BoldThan-ItalicThan"/><StringDetect String="&lt;u>" attribute="Format Tag: Bold-Underline" context="BoldThan-UnderlineThan"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Bold"/><IncludeRules context="SubtitleCommon"/></context><context name="ItalicCBracket" attribute="Italic" lineEmptyContext="#pop#pop"><StringDetect String="{/i}" attribute="Format Tag: Italic" context="#pop"/><StringDetect String="{b}" attribute="Format Tag: Bold-Italic" context="ItalicCBracket-BoldCBracket"/><StringDetect String="{u}" attribute="Format Tag: Italic-Underline" context="ItalicCBracket-UnderlineCBracket"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Italic"/><IncludeRules context="SubtitleCommon"/></context><context name="ItalicThan" attribute="Italic" lineEmptyContext="#pop#pop"><StringDetect String="&lt;/i>" attribute="Format Tag: Italic" context="#pop"/><StringDetect String="&lt;b>" attribute="Format Tag: Bold-Italic" context="ItalicThan-BoldThan"/><StringDetect String="&lt;u>" attribute="Format Tag: Italic-Underline" context="ItalicThan-UnderlineThan"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Italic"/><IncludeRules context="SubtitleCommon"/></context><context name="UnderlineCBracket" attribute="Underline" lineEmptyContext="#pop#pop"><StringDetect String="{/u}" attribute="Format Tag: Underline" context="#pop"/><StringDetect String="{b}" attribute="Format Tag: Bold-Underline" context="UnderlineCBracket-BoldCBracket"/><StringDetect String="{i}" attribute="Format Tag: Italic-Underline" context="UnderlineCBracket-ItalicCBracket"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Underline"/><IncludeRules context="SubtitleCommon"/></context><context name="UnderlineThan" attribute="Underline" lineEmptyContext="#pop#pop"><StringDetect String="&lt;/u>" attribute="Format Tag: Underline" context="#pop"/><StringDetect String="&lt;b>" attribute="Format Tag: Bold-Underline" context="UnderlineThan-BoldThan"/><StringDetect String="&lt;i>" attribute="Format Tag: Italic-Underline" context="UnderlineThan-ItalicThan"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Underline"/><IncludeRules context="SubtitleCommon"/></context><context name="SubtitleContent" attribute="Subtitle" lineEmptyContext="#pop"><StringDetect String="&lt;b>" attribute="Format Tag: Bold" context="BoldThan"/><StringDetect String="&lt;i>" attribute="Format Tag: Italic" context="ItalicThan"/><StringDetect String="&lt;u>" attribute="Format Tag: Underline" context="UnderlineThan"/><StringDetect String="&lt;s>" attribute="Format Tag: Strikethrough" context="StrikeoutThan"/><StringDetect String="{b}" attribute="Format Tag: Bold" context="BoldCBracket"/><StringDetect String="{i}" attribute="Format Tag: Italic" context="ItalicCBracket"/><StringDetect String="{u}" attribute="Format Tag: Underline" context="UnderlineCBracket"/><StringDetect String="{s}" attribute="Format Tag: Strikethrough" context="StrikeoutCBracket"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag"/><IncludeRules context="SubtitleCommon"/></context><context name="Time" attribute="Normal Text" lineEndContext="#pop!SubtitleContent"><StringDetect String="%1" attribute="Appearance Time" dynamic="1"/><StringDetect String="%2" attribute="Time Arrow" dynamic="1"/><StringDetect String="%3" attribute="Disappearance Time" dynamic="1"/><StringDetect String="%4" attribute="Coordinates" context="#pop!SubtitleContent" dynamic="1"/></context><context name="TimeError" attribute="Error" lineEmptyContext="#pop" lineEndContext="Error"/><context name="BoldCBracket-ItalicCBracket" attribute="Bold-Italic" lineEmptyContext="#pop#pop#pop"><StringDetect String="{/i}" attribute="Format Tag: Bold-Italic" context="#pop"/><StringDetect String="{/b}" attribute="Format Tag: Bold-Italic" context="#pop#pop!ItalicCBracket"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Bold-Italic"/><IncludeRules context="SubtitleCommon"/></context><context name="BoldCBracket-UnderlineCBracket" attribute="Bold-Underline" lineEmptyContext="#pop#pop#pop"><StringDetect String="{/u}" attribute="Format Tag: Bold-Underline" context="#pop"/><StringDetect String="{/b}" attribute="Format Tag: Bold-Underline" context="#pop#pop!UnderlineCBracket"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Bold-Underline"/><IncludeRules context="SubtitleCommon"/></context><context name="BoldThan-ItalicThan" attribute="Bold-Italic" lineEmptyContext="#pop#pop#pop"><StringDetect String="&lt;/i>" attribute="Format Tag: Bold-Italic" context="#pop"/><StringDetect String="&lt;/b>" attribute="Format Tag: Bold-Italic" context="#pop#pop!ItalicThan"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Bold-Italic"/><IncludeRules context="SubtitleCommon"/></context><context name="BoldThan-UnderlineThan" attribute="Bold-Underline" lineEmptyContext="#pop#pop#pop"><StringDetect String="&lt;/u>" attribute="Format Tag: Bold-Underline" context="#pop"/><StringDetect String="&lt;/b>" attribute="Format Tag: Bold-Underline" context="#pop#pop!UnderlineThan"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Bold-Underline"/><IncludeRules context="SubtitleCommon"/></context><context name="Error" attribute="Error (Subtitle)" lineEmptyContext="#pop#pop"/><context name="FindHTML" attribute="Normal Text" fallthroughContext="#pop" lineEndContext="#pop"><IncludeRules context="FindElements##HTML"/></context><context name="FindTime" attribute="Normal Text" lineEmptyContext="#pop"><RegExpr String="(\d\d+(?:\:[0-5]\d){2}[\,\.]\d{3}\s+)(\-\->)(\s+\d\d+(?:\:[0-5]\d){2}[\,\.]\d{3})((?:\s+[XY][12]\:\d+){0,4}\s*$)" context="#pop!Time" firstNonSpace="1" lookAhead="1"/><Int attribute="Error" context="#pop!TimeError" firstNonSpace="1"/></context><context name="ItalicCBracket-BoldCBracket" attribute="Bold-Italic" lineEmptyContext="#pop#pop#pop"><StringDetect String="{/b}" attribute="Format Tag: Bold-Italic" context="#pop"/><StringDetect String="{/i}" attribute="Format Tag: Bold-Italic" context="#pop#pop!BoldCBracket"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Bold-Italic"/><IncludeRules context="SubtitleCommon"/></context><context name="ItalicCBracket-UnderlineCBracket" attribute="Italic-Underline" lineEmptyContext="#pop#pop#pop"><StringDetect String="{/u}" attribute="Format Tag: Italic-Underline" context="#pop"/><StringDetect String="{/i}" attribute="Format Tag: Italic-Underline" context="#pop#pop!UnderlineCBracket"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Italic-Underline"/><IncludeRules context="SubtitleCommon"/></context><context name="ItalicThan-BoldThan" attribute="Bold-Italic" lineEmptyContext="#pop#pop#pop"><StringDetect String="&lt;/b>" attribute="Format Tag: Bold-Italic" context="#pop"/><StringDetect String="&lt;/i>" attribute="Format Tag: Bold-Italic" context="#pop#pop!BoldThan"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Bold-Italic"/><IncludeRules context="SubtitleCommon"/></context><context name="ItalicThan-UnderlineThan" attribute="Italic-Underline" lineEmptyContext="#pop#pop#pop"><StringDetect String="&lt;/u>" attribute="Format Tag: Italic-Underline" context="#pop"/><StringDetect String="&lt;/i>" attribute="Format Tag: Italic-Underline" context="#pop#pop!UnderlineThan"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Italic-Underline"/><IncludeRules context="SubtitleCommon"/></context><context name="StrikeoutCBracket" attribute="Strikethrough" lineEmptyContext="#pop#pop"><StringDetect String="{/s}" attribute="Format Tag: Strikethrough" context="#pop"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Strikethrough"/><IncludeRules context="SubtitleCommon"/></context><context name="StrikeoutThan" attribute="Strikethrough" lineEmptyContext="#pop#pop"><StringDetect String="&lt;/s>" attribute="Format Tag: Strikethrough" context="#pop"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Strikethrough"/><IncludeRules context="SubtitleCommon"/></context><context name="UnderlineCBracket-BoldCBracket" attribute="Bold-Underline" lineEmptyContext="#pop#pop#pop"><StringDetect String="{/b}" attribute="Format Tag: Bold-Underline" context="#pop"/><StringDetect String="{/u}" attribute="Format Tag: Bold-Underline" context="#pop#pop!BoldCBracket"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Bold-Underline"/><IncludeRules context="SubtitleCommon"/></context><context name="UnderlineCBracket-ItalicCBracket" attribute="Italic-Underline" lineEmptyContext="#pop#pop#pop"><StringDetect String="{/i}" attribute="Format Tag: Italic-Underline" context="#pop"/><StringDetect String="{/u}" attribute="Format Tag: Italic-Underline" context="#pop#pop!ItalicCBracket"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Italic-Underline"/><IncludeRules context="SubtitleCommon"/></context><context name="UnderlineThan-BoldThan" attribute="Bold-Underline" lineEmptyContext="#pop#pop#pop"><StringDetect String="&lt;/b>" attribute="Format Tag: Bold-Underline" context="#pop"/><StringDetect String="&lt;/u>" attribute="Format Tag: Bold-Underline" context="#pop#pop!BoldThan"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Bold-Underline"/><IncludeRules context="SubtitleCommon"/></context><context name="UnderlineThan-ItalicThan" attribute="Italic-Underline" lineEmptyContext="#pop#pop#pop"><StringDetect String="&lt;/i>" attribute="Format Tag: Italic-Underline" context="#pop"/><StringDetect String="&lt;/u>" attribute="Format Tag: Italic-Underline" context="#pop#pop!ItalicThan"/><RegExpr String="(?:&lt;/?[bius]>|\{/?[bius]\})" attribute="Format Tag: Italic-Underline"/><IncludeRules context="SubtitleCommon"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Sequence Number" defStyleNum="dsOthers" bold="1" spellChecking="0"/><itemData name="Appearance Time" defStyleNum="dsComment" bold="0" italic="0" spellChecking="0"/><itemData name="Disappearance Time" defStyleNum="dsComment" bold="0" italic="0" spellChecking="0"/><itemData name="Time Arrow" defStyleNum="dsComment" bold="1" italic="0" spellChecking="0"/><itemData name="Coordinates" defStyleNum="dsAnnotation" bold="0" italic="0" underline="0" spellChecking="0"/><itemData name="Subtitle" defStyleNum="dsNormal"/><itemData name="Tag" defStyleNum="dsVariable" bold="0" italic="0" underline="0" spellChecking="0"/><itemData name="Line Alignment Tag" defStyleNum="dsVariable" bold="1" italic="0" underline="0" spellChecking="0"/><itemData name="Format Tag" defStyleNum="dsVariable" bold="0" italic="0" underline="0" strikeOut="0" spellChecking="0"/><itemData name="Format Tag: Bold" defStyleNum="dsVariable" bold="1" italic="0" underline="0" strikeOut="0" spellChecking="0"/><itemData name="Format Tag: Italic" defStyleNum="dsVariable" bold="0" italic="1" underline="0" strikeOut="0" spellChecking="0"/><itemData name="Format Tag: Underline" defStyleNum="dsVariable" bold="0" italic="0" underline="1" strikeOut="0" spellChecking="0"/><itemData name="Format Tag: Strikethrough" defStyleNum="dsVariable" bold="0" italic="0" underline="0" strikeOut="1" spellChecking="0"/><itemData name="Format Tag: Bold-Italic" defStyleNum="dsVariable" bold="1" italic="1" underline="0" strikeOut="0" spellChecking="0"/><itemData name="Format Tag: Bold-Underline" defStyleNum="dsVariable" bold="1" italic="0" underline="1" strikeOut="0" spellChecking="0"/><itemData name="Format Tag: Italic-Underline" defStyleNum="dsVariable" bold="0" italic="1" underline="1" strikeOut="0" spellChecking="0"/><itemData name="Bold" defStyleNum="dsNormal" bold="1"/><itemData name="Italic" defStyleNum="dsNormal" italic="1"/><itemData name="Underline" defStyleNum="dsNormal" underline="1"/><itemData name="Strikethrough" defStyleNum="dsNormal" strikeOut="1"/><itemData name="Bold-Italic" defStyleNum="dsNormal" bold="1" italic="1"/><itemData name="Bold-Underline" defStyleNum="dsNormal" bold="1" underline="1"/><itemData name="Italic-Underline" defStyleNum="dsNormal" italic="1" underline="1"/><itemData name="Escape" defStyleNum="dsSpecialChar" spellChecking="0"/><itemData name="Error" defStyleNum="dsError"/><itemData name="Error (Subtitle)" defStyleNum="dsError" bold="0" italic="0" underline="0"/></itemDatas></highlighting></language>