Warning, /frameworks/syntax-highlighting/data/syntax/subrip-subtitles.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 time "\d\d+(?:\:[0-5]\d){2}[\,\.]\d{3}"> 0005 <!ENTITY coordinates "(?:\s+[XY][12]\:\d+){0,4}\s*$"> 0006 <!ENTITY formatTags "(?:</?[bius]>|\{/?[bius]\})"> 0007 <!ENTITY htmlName "[A-Za-z_\:][\w\.\:\-]*"> 0008 <!ENTITY htmlAttributeName "[A-Za-z_:\*#\(\[][\)\]\w\.\:_\-]+"> 0009 ]> 0010 0011 <!-- 0012 SubRip Text (.SRT) Subtitles Syntax Highlighting Definition 0013 =========================================================================== 0014 0015 This file is part of the KDE's KSyntaxHighlighting framework. 0016 0017 SPDX-FileCopyrightText: 2019-2020 Nibaldo González S. <nibgonz@gmail.com> 0018 0019 SPDX-License-Identifier: MIT 0020 0021 =========================================================================== 0022 0023 Mor information: http://ale5000.altervista.org/subtitles.htm 0024 0025 Last update: September 30, 2020 (v2) 0026 --> 0027 0028 <language name="SubRip Subtitles" 0029 version="5" 0030 kateversion="5.79" 0031 section="Other" 0032 extensions="*.srt" 0033 mimetype="application/x-subrip" 0034 priority="9" 0035 author="Nibaldo González (nibgonz@gmail.com)" 0036 license="MIT"> 0037 0038 <highlighting> 0039 0040 <contexts> 0041 0042 <context name="Normal" attribute="Normal Text" lineEndContext="#stay"> 0043 <RegExpr context="FindTime" attribute="Sequence Number" String="\d+(?=\s*$)" firstNonSpace="true" /> 0044 <RegExpr context="Time" String="(&time;\s+)(\-\->)(\s+&time;)(&coordinates;)" firstNonSpace="true" lookAhead="true" /> 0045 <Int context="TimeError" attribute="Error" firstNonSpace="true" /> 0046 </context> 0047 <context name="FindTime" attribute="Normal Text" lineEndContext="#stay" lineEmptyContext="#pop"> 0048 <RegExpr context="#pop!Time" String="(&time;\s+)(\-\->)(\s+&time;)(&coordinates;)" firstNonSpace="true" lookAhead="true" /> 0049 <Int context="#pop!TimeError" attribute="Error" firstNonSpace="true" /> 0050 </context> 0051 <context name="Time" attribute="Normal Text" lineEndContext="#pop!SubtitleContent"> 0052 <StringDetect context="#stay" attribute="Appearance Time" String="%1" dynamic="true" /> 0053 <StringDetect context="#stay" attribute="Time Arrow" String="%2" dynamic="true" /> 0054 <StringDetect context="#stay" attribute="Disappearance Time" String="%3" dynamic="true" /> 0055 <StringDetect context="#pop!SubtitleContent" attribute="Coordinates" String="%4" dynamic="true" /> 0056 </context> 0057 0058 <!-- Mark all subtitle text as error --> 0059 <context name="TimeError" attribute="Error" lineEndContext="Error" lineEmptyContext="#pop" /> 0060 <context name="Error" attribute="Error (Subtitle)" lineEndContext="#stay" lineEmptyContext="#pop#pop" /> 0061 0062 <context name="SubtitleContent" attribute="Subtitle" lineEndContext="#stay" lineEmptyContext="#pop"> 0063 <StringDetect context="BoldThan" attribute="Format Tag: Bold" String="<b>" /> 0064 <StringDetect context="ItalicThan" attribute="Format Tag: Italic" String="<i>" /> 0065 <StringDetect context="UnderlineThan" attribute="Format Tag: Underline" String="<u>" /> 0066 <StringDetect context="StrikeoutThan" attribute="Format Tag: Strikethrough" String="<s>" /> 0067 <StringDetect context="BoldCBracket" attribute="Format Tag: Bold" String="{b}" /> 0068 <StringDetect context="ItalicCBracket" attribute="Format Tag: Italic" String="{i}" /> 0069 <StringDetect context="UnderlineCBracket" attribute="Format Tag: Underline" String="{u}" /> 0070 <StringDetect context="StrikeoutCBracket" attribute="Format Tag: Strikethrough" String="{s}" /> 0071 <RegExpr context="#stay" attribute="Format Tag" String="&formatTags;" /> 0072 <IncludeRules context="SubtitleCommon" /> 0073 </context> 0074 0075 <context name="SubtitleCommon" attribute="Subtitle" lineEndContext="#stay"> 0076 <!-- {\anX} --> 0077 <RegExpr context="#stay" attribute="Line Alignment Tag" String="\{\\an\d\}" /> 0078 <!-- {\some_letters_or_numbers_or_chars}, {Y:some_letters_or_numbers_or_chars} --> 0079 <RegExpr context="#stay" attribute="Tag" String="\{(?:\\|Y\:)[^\{\}\s][^\{\}]*\}" /> 0080 <RegExpr context="#stay" attribute="Escape" String="\\[hN<>\{\}]" /> 0081 <!-- HTML Tag --> 0082 <RegExpr context="FindHTML" String="<&htmlName;(?:\s+&htmlAttributeName;(?:\s*\=\s*(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^><"'\s]+))?)*\s*/?>|</&htmlName;\s*>" lookAhead="true" /> 0083 </context> 0084 <context name="FindHTML" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop"> 0085 <IncludeRules context="FindElements##HTML" /> 0086 </context> 0087 0088 <!-- Format Tag: <b>, <i>, <u>, <s> --> 0089 <context name="BoldThan" attribute="Bold" lineEndContext="#stay" lineEmptyContext="#pop#pop"> 0090 <StringDetect context="#pop" attribute="Format Tag: Bold" String="</b>" /> 0091 <StringDetect context="BoldThan-ItalicThan" attribute="Format Tag: Bold-Italic" String="<i>" /> 0092 <StringDetect context="BoldThan-UnderlineThan" attribute="Format Tag: Bold-Underline" String="<u>" /> 0093 <RegExpr context="#stay" attribute="Format Tag: Bold" String="&formatTags;" /> 0094 <IncludeRules context="SubtitleCommon" /> 0095 </context> 0096 <context name="ItalicThan" attribute="Italic" lineEndContext="#stay" lineEmptyContext="#pop#pop"> 0097 <StringDetect context="#pop" attribute="Format Tag: Italic" String="</i>" /> 0098 <StringDetect context="ItalicThan-BoldThan" attribute="Format Tag: Bold-Italic" String="<b>" /> 0099 <StringDetect context="ItalicThan-UnderlineThan" attribute="Format Tag: Italic-Underline" String="<u>" /> 0100 <RegExpr context="#stay" attribute="Format Tag: Italic" String="&formatTags;" /> 0101 <IncludeRules context="SubtitleCommon" /> 0102 </context> 0103 <context name="UnderlineThan" attribute="Underline" lineEndContext="#stay" lineEmptyContext="#pop#pop"> 0104 <StringDetect context="#pop" attribute="Format Tag: Underline" String="</u>" /> 0105 <StringDetect context="UnderlineThan-BoldThan" attribute="Format Tag: Bold-Underline" String="<b>" /> 0106 <StringDetect context="UnderlineThan-ItalicThan" attribute="Format Tag: Italic-Underline" String="<i>" /> 0107 <RegExpr context="#stay" attribute="Format Tag: Underline" String="&formatTags;" /> 0108 <IncludeRules context="SubtitleCommon" /> 0109 </context> 0110 <context name="StrikeoutThan" attribute="Strikethrough" lineEndContext="#stay" lineEmptyContext="#pop#pop"> 0111 <StringDetect context="#pop" attribute="Format Tag: Strikethrough" String="</s>" /> 0112 <RegExpr context="#stay" attribute="Format Tag: Strikethrough" String="&formatTags;" /> 0113 <IncludeRules context="SubtitleCommon" /> 0114 </context> 0115 0116 <!-- Format Tag: {b}, {i}, {u}, {s} --> 0117 <context name="BoldCBracket" attribute="Bold" lineEndContext="#stay" lineEmptyContext="#pop#pop"> 0118 <StringDetect context="#pop" attribute="Format Tag: Bold" String="{/b}" /> 0119 <StringDetect context="BoldCBracket-ItalicCBracket" attribute="Format Tag: Bold-Italic" String="{i}" /> 0120 <StringDetect context="BoldCBracket-UnderlineCBracket" attribute="Format Tag: Bold-Underline" String="{u}" /> 0121 <RegExpr context="#stay" attribute="Format Tag: Bold" String="&formatTags;" /> 0122 <IncludeRules context="SubtitleCommon" /> 0123 </context> 0124 <context name="ItalicCBracket" attribute="Italic" lineEndContext="#stay" lineEmptyContext="#pop#pop"> 0125 <StringDetect context="#pop" attribute="Format Tag: Italic" String="{/i}" /> 0126 <StringDetect context="ItalicCBracket-BoldCBracket" attribute="Format Tag: Bold-Italic" String="{b}" /> 0127 <StringDetect context="ItalicCBracket-UnderlineCBracket" attribute="Format Tag: Italic-Underline" String="{u}" /> 0128 <RegExpr context="#stay" attribute="Format Tag: Italic" String="&formatTags;" /> 0129 <IncludeRules context="SubtitleCommon" /> 0130 </context> 0131 <context name="UnderlineCBracket" attribute="Underline" lineEndContext="#stay" lineEmptyContext="#pop#pop"> 0132 <StringDetect context="#pop" attribute="Format Tag: Underline" String="{/u}" /> 0133 <StringDetect context="UnderlineCBracket-BoldCBracket" attribute="Format Tag: Bold-Underline" String="{b}" /> 0134 <StringDetect context="UnderlineCBracket-ItalicCBracket" attribute="Format Tag: Italic-Underline" String="{i}" /> 0135 <RegExpr context="#stay" attribute="Format Tag: Underline" String="&formatTags;" /> 0136 <IncludeRules context="SubtitleCommon" /> 0137 </context> 0138 <context name="StrikeoutCBracket" attribute="Strikethrough" lineEndContext="#stay" lineEmptyContext="#pop#pop"> 0139 <StringDetect context="#pop" attribute="Format Tag: Strikethrough" String="{/s}" /> 0140 <RegExpr context="#stay" attribute="Format Tag: Strikethrough" String="&formatTags;" /> 0141 <IncludeRules context="SubtitleCommon" /> 0142 </context> 0143 0144 <!-- Bold-Italic --> 0145 0146 <!-- <b> <i> text </i> </b> --> 0147 <context name="BoldThan-ItalicThan" attribute="Bold-Italic" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0148 <StringDetect context="#pop" attribute="Format Tag: Bold-Italic" String="</i>" /> 0149 <StringDetect context="#pop#pop!ItalicThan" attribute="Format Tag: Bold-Italic" String="</b>" /> 0150 <RegExpr context="#stay" attribute="Format Tag: Bold-Italic" String="&formatTags;" /> 0151 <IncludeRules context="SubtitleCommon" /> 0152 </context> 0153 <!-- <i> <b> text </b> </i> --> 0154 <context name="ItalicThan-BoldThan" attribute="Bold-Italic" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0155 <StringDetect context="#pop" attribute="Format Tag: Bold-Italic" String="</b>" /> 0156 <StringDetect context="#pop#pop!BoldThan" attribute="Format Tag: Bold-Italic" String="</i>" /> 0157 <RegExpr context="#stay" attribute="Format Tag: Bold-Italic" String="&formatTags;" /> 0158 <IncludeRules context="SubtitleCommon" /> 0159 </context> 0160 <!-- {b} {i} text {/i} {/b} --> 0161 <context name="BoldCBracket-ItalicCBracket" attribute="Bold-Italic" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0162 <StringDetect context="#pop" attribute="Format Tag: Bold-Italic" String="{/i}" /> 0163 <StringDetect context="#pop#pop!ItalicCBracket" attribute="Format Tag: Bold-Italic" String="{/b}" /> 0164 <RegExpr context="#stay" attribute="Format Tag: Bold-Italic" String="&formatTags;" /> 0165 <IncludeRules context="SubtitleCommon" /> 0166 </context> 0167 <!-- {i} {b} text {/b} {/i} --> 0168 <context name="ItalicCBracket-BoldCBracket" attribute="Bold-Italic" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0169 <StringDetect context="#pop" attribute="Format Tag: Bold-Italic" String="{/b}" /> 0170 <StringDetect context="#pop#pop!BoldCBracket" attribute="Format Tag: Bold-Italic" String="{/i}" /> 0171 <RegExpr context="#stay" attribute="Format Tag: Bold-Italic" String="&formatTags;" /> 0172 <IncludeRules context="SubtitleCommon" /> 0173 </context> 0174 0175 <!-- Bold-Underline --> 0176 0177 <!-- <b> <u> text </u> </b> --> 0178 <context name="BoldThan-UnderlineThan" attribute="Bold-Underline" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0179 <StringDetect context="#pop" attribute="Format Tag: Bold-Underline" String="</u>" /> 0180 <StringDetect context="#pop#pop!UnderlineThan" attribute="Format Tag: Bold-Underline" String="</b>" /> 0181 <RegExpr context="#stay" attribute="Format Tag: Bold-Underline" String="&formatTags;" /> 0182 <IncludeRules context="SubtitleCommon" /> 0183 </context> 0184 <!-- <u> <b> text </b> </u> --> 0185 <context name="UnderlineThan-BoldThan" attribute="Bold-Underline" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0186 <StringDetect context="#pop" attribute="Format Tag: Bold-Underline" String="</b>" /> 0187 <StringDetect context="#pop#pop!BoldThan" attribute="Format Tag: Bold-Underline" String="</u>" /> 0188 <RegExpr context="#stay" attribute="Format Tag: Bold-Underline" String="&formatTags;" /> 0189 <IncludeRules context="SubtitleCommon" /> 0190 </context> 0191 <!-- {b} {u} text {/u} {/b} --> 0192 <context name="BoldCBracket-UnderlineCBracket" attribute="Bold-Underline" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0193 <StringDetect context="#pop" attribute="Format Tag: Bold-Underline" String="{/u}" /> 0194 <StringDetect context="#pop#pop!UnderlineCBracket" attribute="Format Tag: Bold-Underline" String="{/b}" /> 0195 <RegExpr context="#stay" attribute="Format Tag: Bold-Underline" String="&formatTags;" /> 0196 <IncludeRules context="SubtitleCommon" /> 0197 </context> 0198 <!-- {u} {b} text {/b} {/u} --> 0199 <context name="UnderlineCBracket-BoldCBracket" attribute="Bold-Underline" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0200 <StringDetect context="#pop" attribute="Format Tag: Bold-Underline" String="{/b}" /> 0201 <StringDetect context="#pop#pop!BoldCBracket" attribute="Format Tag: Bold-Underline" String="{/u}" /> 0202 <RegExpr context="#stay" attribute="Format Tag: Bold-Underline" String="&formatTags;" /> 0203 <IncludeRules context="SubtitleCommon" /> 0204 </context> 0205 0206 <!-- Italic-Underline --> 0207 0208 <!-- <i> <u> text </u> </i> --> 0209 <context name="ItalicThan-UnderlineThan" attribute="Italic-Underline" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0210 <StringDetect context="#pop" attribute="Format Tag: Italic-Underline" String="</u>" /> 0211 <StringDetect context="#pop#pop!UnderlineThan" attribute="Format Tag: Italic-Underline" String="</i>" /> 0212 <RegExpr context="#stay" attribute="Format Tag: Italic-Underline" String="&formatTags;" /> 0213 <IncludeRules context="SubtitleCommon" /> 0214 </context> 0215 <!-- <u> <i> text </i> </u> --> 0216 <context name="UnderlineThan-ItalicThan" attribute="Italic-Underline" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0217 <StringDetect context="#pop" attribute="Format Tag: Italic-Underline" String="</i>" /> 0218 <StringDetect context="#pop#pop!ItalicThan" attribute="Format Tag: Italic-Underline" String="</u>" /> 0219 <RegExpr context="#stay" attribute="Format Tag: Italic-Underline" String="&formatTags;" /> 0220 <IncludeRules context="SubtitleCommon" /> 0221 </context> 0222 <!-- {i} {u} text {/u} {/i} --> 0223 <context name="ItalicCBracket-UnderlineCBracket" attribute="Italic-Underline" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0224 <StringDetect context="#pop" attribute="Format Tag: Italic-Underline" String="{/u}" /> 0225 <StringDetect context="#pop#pop!UnderlineCBracket" attribute="Format Tag: Italic-Underline" String="{/i}" /> 0226 <RegExpr context="#stay" attribute="Format Tag: Italic-Underline" String="&formatTags;" /> 0227 <IncludeRules context="SubtitleCommon" /> 0228 </context> 0229 <!-- {u} {i} text {/i} {/u} --> 0230 <context name="UnderlineCBracket-ItalicCBracket" attribute="Italic-Underline" lineEndContext="#stay" lineEmptyContext="#pop#pop#pop"> 0231 <StringDetect context="#pop" attribute="Format Tag: Italic-Underline" String="{/i}" /> 0232 <StringDetect context="#pop#pop!ItalicCBracket" attribute="Format Tag: Italic-Underline" String="{/u}" /> 0233 <RegExpr context="#stay" attribute="Format Tag: Italic-Underline" String="&formatTags;" /> 0234 <IncludeRules context="SubtitleCommon" /> 0235 </context> 0236 0237 </contexts> 0238 0239 <itemDatas> 0240 <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" /> 0241 0242 <itemData name="Sequence Number" defStyleNum="dsOthers" bold="1" spellChecking="false" /> 0243 <itemData name="Appearance Time" defStyleNum="dsComment" bold="0" italic="0" spellChecking="false" /> 0244 <itemData name="Disappearance Time" defStyleNum="dsComment" bold="0" italic="0" spellChecking="false" /> 0245 <itemData name="Time Arrow" defStyleNum="dsComment" bold="1" italic="0" spellChecking="false" /> 0246 <itemData name="Coordinates" defStyleNum="dsAnnotation" bold="0" italic="0" underline="0" spellChecking="false" /> 0247 <itemData name="Subtitle" defStyleNum="dsNormal" /> 0248 0249 <itemData name="Tag" defStyleNum="dsVariable" bold="0" italic="0" underline="0" spellChecking="false" /> 0250 <itemData name="Line Alignment Tag" defStyleNum="dsVariable" bold="1" italic="0" underline="0" spellChecking="false" /> 0251 <itemData name="Format Tag" defStyleNum="dsVariable" bold="0" italic="0" underline="0" strikeOut="0" spellChecking="false" /> 0252 <itemData name="Format Tag: Bold" defStyleNum="dsVariable" bold="1" italic="0" underline="0" strikeOut="0" spellChecking="false" /> 0253 <itemData name="Format Tag: Italic" defStyleNum="dsVariable" bold="0" italic="1" underline="0" strikeOut="0" spellChecking="false" /> 0254 <itemData name="Format Tag: Underline" defStyleNum="dsVariable" bold="0" italic="0" underline="1" strikeOut="0" spellChecking="false" /> 0255 <itemData name="Format Tag: Strikethrough" defStyleNum="dsVariable" bold="0" italic="0" underline="0" strikeOut="1" spellChecking="false" /> 0256 <itemData name="Format Tag: Bold-Italic" defStyleNum="dsVariable" bold="1" italic="1" underline="0" strikeOut="0" spellChecking="false" /> 0257 <itemData name="Format Tag: Bold-Underline" defStyleNum="dsVariable" bold="1" italic="0" underline="1" strikeOut="0" spellChecking="false" /> 0258 <itemData name="Format Tag: Italic-Underline" defStyleNum="dsVariable" bold="0" italic="1" underline="1" strikeOut="0" spellChecking="false" /> 0259 <itemData name="Bold" defStyleNum="dsNormal" bold="1" /> 0260 <itemData name="Italic" defStyleNum="dsNormal" italic="1" /> 0261 <itemData name="Underline" defStyleNum="dsNormal" underline="1" /> 0262 <itemData name="Strikethrough" defStyleNum="dsNormal" strikeOut="1" /> 0263 <itemData name="Bold-Italic" defStyleNum="dsNormal" bold="1" italic="1" /> 0264 <itemData name="Bold-Underline" defStyleNum="dsNormal" bold="1" underline="1" /> 0265 <itemData name="Italic-Underline" defStyleNum="dsNormal" italic="1" underline="1" /> 0266 0267 <itemData name="Escape" defStyleNum="dsSpecialChar" spellChecking="false" /> 0268 <itemData name="Error" defStyleNum="dsError" /> 0269 <itemData name="Error (Subtitle)" defStyleNum="dsError" bold="0" italic="0" underline="0" /> 0270 </itemDatas> 0271 0272 </highlighting> 0273 0274 </language> 0275 <!-- kate: replace-tabs off; tab-width 3; indent-width 3; remove-trailing-spaces mod; dynamic-word-wrap off; -->