Warning, /frameworks/syntax-highlighting/data/syntax/markdown.xml is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!--
0003     Kate syntax highlight filter for Markdown/MultiMarkdown documents.
0004 
0005     Copyright 2008 Darrin Yeager. http://www.dyeager.org/
0006     Dual-Licensed under both GPL and BSD licenses.
0007 
0008     Extended 2009 Claes Holmerson. http://github.com/claes/kate-markdown/
0009     Extended 2019 Nibaldo González S. <nibgonz@gmail.com> (changes under MIT license).
0010 -->
0011 <!--
0012     The [^\s]{1} is in the regex to avoid interfering with bullet list which
0013     starts "* item". Thus emphasis/strong MUST be formed like *words here*
0014     with the asterisks next to the beginning of the first word.
0015 
0016     Match space or newline, followed by "*", followed by one non-space,
0017     followed by anything non-asterisk, followed by "*", followed by
0018     space, end-of-sentence punctuation, or the end of the line.
0019 
0020     TODO: We can be more specific and highlight text combinations in bold,
0021           italic and strikethrough.
0022           Example: **bold text and _italic and bold text_**
0023                    __bold and ~~strikeout and bold~~__
0024 -->
0025 <!DOCTYPE language
0026 [
0027 <!-- NOTE: To correctly detect bold, italic or strike out text, use minimal="true" in RegExpr rules -->
0028 <!ENTITY contentregex_ast "(?:(?:[^\*\s\\]|\\.)(?:[^\\]|\\.)*)?(?:[^\*\s\\]|\\\S)">
0029 <!ENTITY contentregex_und "(?:(?:[^_\s\\]|\\.)(?:[^\\]|\\.)*)?(?:[^_\s\\]|\\\S)">
0030 <!-- strong + emphasis text -->
0031 <!ENTITY strongemphasisregex_ast "\*{3,5}&contentregex_ast;\*{3}">
0032 <!ENTITY strongemphasisregex_und "\b_{3,5}&contentregex_und;_{3}">
0033 <!ENTITY strongemphasisregex_ast_und "\*{2,5}(?:(?:_|_{3}|_{5})&contentregex_und;_+|(?:_{2}|_{4})&contentregex_und;_)\*{2}">
0034 <!ENTITY strongemphasisregex_ast_und2 "\*_{2,5}&contentregex_und;_{2,5}\*(?!\*)">
0035 <!ENTITY strongemphasisregex_und_ast "\b_{2,5}(?:(?:\*|\*{3}|\*{5})&contentregex_ast;\*+|(?:\*{2}|\*{4})&contentregex_ast;\*)_{2}">
0036 <!ENTITY strongemphasisregex_und_ast2 "\b_(?:\*{2,5}&contentregex_ast;\*{2,5}_{0,4}|_{0,4}\*{2,5}&contentregex_ast;\*{2,5})_\b">
0037 <!-- strong text -->
0038 <!ENTITY strongregex_ast "\*{2}(?:&contentregex_ast;\*{2}|\*{1,3}&contentregex_ast;\*{2}(?!\*))">
0039 <!ENTITY strongregex_und "\b_{2}(?:&contentregex_und;_{2}|_{1,3}&contentregex_und;_{2}(?!_))">
0040 <!-- emphasis text -->
0041 <!ENTITY emphasisregex_ast "\*(?:&contentregex_ast;\*|\*{1,4}&contentregex_ast;\*(?!\*))">
0042 <!ENTITY emphasisregex_und "\b_(?:&contentregex_und;_+|_{1,4}&contentregex_und;_)\b">
0043 <!-- links.
0044      Keep in sync with reStructuredText (rest) -->
0045 <!ENTITY startlink "(?:https?|ftp)\://">
0046 <!ENTITY link "&startlink;[^&quot;&gt;\s]+">
0047 <!-- link in normal text.
0048      Keep in sync with reStructuredText’s (rest) StandaloneHyperlink attribute -->
0049 <!ENTITY implicitlink "\b&startlink;[^&quot;&gt;\s`\)]*[^\s!&quot;&apos;`\(\)\*,\.:;&lt;&gt;\?~\]\}\\](?=[[:punct:]]*(?:[\s\)]|$))">
0050 <!-- references: [name], [name][id], [name][id] "title", [name](https://example.com) -->
0051 <!ENTITY refchar "(?:\\.|[^\]\\])">
0052 <!ENTITY refname "(?:\\.|[^\s\[\]\\])&refchar;*">
0053 <!ENTITY reflinkid "\s*(?:&refname;)?">
0054 <!ENTITY reflinkidregex "(?:\s?\[&reflinkid;\]|\((?:\\.|[^\(\)\\])*\))">
0055 <!ENTITY reflinkregex "\[(?:(?=\s*&refname;\])|\s+(?=\]))">
0056 <!-- target ref.: [id]: https://example.com "Title" -->
0057 <!ENTITY reflinktargetregex '\[\s*(?:&refname;|\s)\]\:\s+(?=\S)'>
0058 <!-- footnote: [^name] -->
0059 <!ENTITY footnoteregex "\[\^&refchar;+\]">
0060 <!-- image: ![title](https://example.com), ![title][id] -->
0061 <!ENTITY startinlineimage "\!\[(?:\\.|[^\[\]\\])*\]\(">
0062 <!ENTITY endinlineimage "(?:\\.|[^\(\)\\])*\)">
0063 <!ENTITY inlineimageregex "&startinlineimage;(?=&endinlineimage;)">
0064 <!ENTITY refimageregex "\!\[(?:\\.|[^\[\]\\])*\]\[&reflinkid;\]">
0065 <!-- autolink & email: <https://example.com>, <example@kde.org>, <mailto:example@kde.org> -->
0066 <!ENTITY autolinkregex '&lt;&link;&gt;'>
0067 <!ENTITY email "[\-\.\w]+\@[\-a-z0-9]+(?:\.[\-a-z0-9]+)*\.[a-z]+">
0068 <!ENTITY mailtolinkregex "&lt;(?:mailto:)?(?=&email;&gt;)">
0069 <!-- horizontal rule: avoid conflicts with strong-emphasis text, lists and code blocks -->
0070 <!ENTITY rulerregex "\s*(?:(?:\*\s*){3,}|(?:_\s*){3,}|(?:\-\s*){3,})\s*$">
0071 <!-- two spaces at end of line generates linebreak -->
0072 <!ENTITY linebreakregex "  $">
0073 <!-- strikethrough text, pandoc style -->
0074 <!ENTITY strikeoutregex "[~]{2}[^~](?:.*[^~])?[~]{2}">
0075 <!-- start of fenced code block -->
0076 <!ENTITY fcode "(`{3,}|~{3,})">
0077 <!-- end of line & empty line -->
0078 <!ENTITY end "\s*$">
0079 <!ENTITY emptyline "^\s*$">
0080 <!-- indented code block -->
0081 <!ENTITY indentedcodeblock "(?:\s{4}|\t).*$">
0082 <!-- bullet of list -->
0083 <!ENTITY listbullet "[\*\+\-]">
0084 <!-- metadata key & name of html tag -->
0085 <!ENTITY metadatakey "[a-zA-Z0-9][\w\-\s]*\:">
0086 <!ENTITY htmlname "[A-Za-z_\:][\w\.\:\-]*">
0087 <!-- comment -->
0088 <!ENTITY startcomment "&lt;!--">
0089 <!ENTITY endcomment "--&gt;">
0090 <!ENTITY checkbox "\[[ x]\](?=\s)">
0091 ]>
0092 
0093 <language name="Markdown" version="26" kateversion="5.79" section="Markup" extensions="*.md;*.mmd;*.markdown" mimetype="text/markdown" priority="15" author="Darrin Yeager, Claes Holmerson" license="GPL,BSD">
0094   <highlighting>
0095     <contexts>
0096       <!-- Start of the Markdown document: find metadata or code block -->
0097       <context name="Start Document" attribute="Normal Text" lineEndContext="Normal Text" lineEmptyContext="Normal Text" fallthroughContext="Normal Text">
0098         <!-- Some titles: (Title|Author|Date|Copyright|Revision|CSS|LaTeX\ XSLT|Categories|Tags|BaseName|Excerpt) -->
0099         <!-- Metadata: Markdown format -->
0100         <RegExpr attribute="Metadata" context="metadata" String="^\-{3}&end;" column="0" beginRegion="metadata"/>
0101         <!-- Metadata: MultiMarkdown format -->
0102         <RegExpr attribute="Metadata Title" context="metadata-mm-value" String="^&metadatakey;(?=\s|$)" column="0"/>
0103         <!-- Code Block -->
0104         <RegExpr attribute="Code" context="find-code-block-start" String="^&indentedcodeblock;" column="0"/>
0105       </context>
0106       <context name="metadata" attribute="Metadata" lineEndContext="#stay">
0107         <StringDetect attribute="Metadata" context="#pop!Normal Text" String="---" column="0" endRegion="metadata"/>
0108         <StringDetect attribute="Metadata" context="#pop!Normal Text" String="..." column="0" endRegion="metadata"/>
0109         <RegExpr attribute="Metadata Title" String="^&metadatakey;(?=\s|$)" column="0"/>
0110       </context>
0111       <context name="metadata-mm-value" attribute="Metadata" lineEndContext="#pop!metadata-mm"/>
0112       <context name="metadata-mm" attribute="Metadata" lineEndContext="#stay" lineEmptyContext="#pop!Normal Text" fallthroughContext="#pop!Normal Text">
0113         <!-- Find Metadata key or value -->
0114         <RegExpr attribute="Metadata Title" context="#pop!metadata-mm-value" String="^&metadatakey;(?=\s|$)" column="0"/>
0115         <RegExpr attribute="Metadata" context="#pop!metadata-mm-value" String="^(?:\s{4}|\t)" column="0"/>
0116       </context>
0117       <context name="find-code-block-start" attribute="Normal Text" lineEndContext="#stay" lineEmptyContext="#stay" fallthroughContext="#pop!Normal Text">
0118         <IncludeRules context="find-code-block"/>
0119       </context>
0120 
0121       <!-- Normal Text Document -->
0122       <context name="Normal Text" attribute="Normal Text" lineEndContext="#stay" lineEmptyContext="find-code-block">
0123         <!-- Header -->
0124         <DetectChar context="find-header" char="#" column="0" lookAhead="true"/>
0125         <RegExpr attribute="Header H1" String="(?:\=\s*){2,}$" firstNonSpace="true"/>
0126         <!-- Highlight code block after line only with spaces or comment -->
0127         <RegExpr attribute="Normal Text" context="find-code-block" String="&emptyline;" column="0"/>
0128         <StringDetect attribute="Comment" context="find-code-block" String="&startcomment;" column="0" lookAhead="true"/>
0129         <!-- Horizontal rules, Blockquotes and Lists.
0130              NOTE: The indentation of the lists is captured. -->
0131         <RegExpr attribute="Horizontal Rule" context="find-code-block" String="^&rulerregex;" column="0"/>
0132         <DetectChar attribute="Blockquote" context="blockquote" char="&gt;" firstNonSpace="true"/>
0133         <RegExpr attribute="List" context="list" String="^(\s*)&listbullet;(\s+)" column="0"/>
0134         <RegExpr attribute="Number List" context="numlist" String="^(\s*)\d\.(\s+)" column="0"/>
0135         <RegExpr attribute="Number List" context="numlist2" String="^(\s*)\d\d+\.(\s+)" column="0"/>
0136         <!-- Find Strong, Emphasis and Strikethrough Text -->
0137         <DetectChar context="find-strong-normal" char="*" lookAhead="true"/>
0138         <DetectChar context="find-emphasis-normal" char="_" lookAhead="true"/>
0139         <RegExpr attribute="Strikethrough Text" minimal="true" String="&strikeoutregex;"/>
0140         <!-- Common -->
0141         <IncludeRules context="inc"/>
0142         <RegExpr attribute="Normal Text: Link" String="&implicitlink;"/>
0143       </context>
0144       <!-- Find indented code blocks. These are only allowed after an empty line or on the first line -->
0145       <context name="find-code-block" attribute="Normal Text" lineEndContext="#stay" lineEmptyContext="#stay" fallthroughContext="#pop">
0146         <RegExpr attribute="Code" String="^&indentedcodeblock;" column="0"/>
0147         <RegExpr attribute="Normal Text" String="&end;" />
0148         <RegExpr attribute="Comment" context="comment" String="^\s*&startcomment;|\s*&startcomment;(?=.*&endcomment;)" beginRegion="comment"/>
0149       </context>
0150 
0151       <context name="find-header" attribute="Normal Text" lineEndContext="#pop">
0152         <RegExpr attribute="Header H1" context="#pop!close-H2-region" String="^#\s" column="0" endRegion="H1" beginRegion="H1" lookAhead="true"/>
0153         <RegExpr attribute="Header H2" context="#pop!close-H3-region" String="^##\s" column="0" endRegion="H2" beginRegion="H2" lookAhead="true"/>
0154         <RegExpr attribute="Header H3" context="#pop!close-H4-region" String="^###\s" column="0" endRegion="H3" beginRegion="H3" lookAhead="true"/>
0155         <RegExpr attribute="Header H4" context="#pop!close-H5-region" String="^####\s" column="0" endRegion="H4" beginRegion="H4" lookAhead="true"/>
0156         <RegExpr attribute="Header H5" context="#pop!close-H6-region" String="^#####\s" column="0" endRegion="H5" beginRegion="H5" lookAhead="true"/>
0157         <RegExpr attribute="Header H6" context="#pop" String="^######\s.*" column="0" endRegion="H6" beginRegion="H6"/>
0158         <DetectChar attribute="Normal Text" context="#pop" char="#"/>
0159       </context>
0160       <!-- BUG: 441278 sub-headers should be closed when their parent header is closed  (e.g. in h1 h2 h3 h1, h1-h3 should all be closed at the 2nd h1) -->
0161       <!-- TODO: Port to a less hacky version (maybe a new attribute for declaring multiple endRegions)  -->
0162       <context name="close-H2-region" attribute="Header H2" lineEndContext="#pop!close-H3-region" fallthroughContext="#pop!close-H3-region">
0163         <DetectChar attribute="Header H2" context="#pop!close-H3-region" char="#" lookAhead="true" endRegion="H2"/>
0164       </context>
0165       <context name="close-H3-region" attribute="Header H3" lineEndContext="#pop!close-H4-region" fallthroughContext="#pop!close-H4-region">
0166         <DetectChar attribute="Header H3" context="#pop!close-H4-region" char="#" lookAhead="true" endRegion="H3"/>
0167       </context>
0168       <context name="close-H4-region" attribute="Header H4" lineEndContext="#pop!close-H5-region" fallthroughContext="#pop!close-H5-region">
0169         <DetectChar attribute="Header H4" context="#pop!close-H5-region" char="#" lookAhead="true" endRegion="H4"/>
0170       </context>
0171       <context name="close-H5-region" attribute="Header H5" lineEndContext="#pop!close-H6-region" fallthroughContext="#pop!close-H6-region">
0172         <DetectChar attribute="Header H5" context="#pop!close-H6-region" char="#" lookAhead="true" endRegion="H5"/>
0173       </context>
0174       <context name="close-H6-region" attribute="Header H6" lineEndContext="#pop" fallthroughContext="#pop">
0175         <DetectChar attribute="Header H6" context="#pop!close-sentinel-region" char="#" lookAhead="true" endRegion="H6"/>
0176       </context>
0177       <!-- This sentinel does not close any actual region, it's just here so that the proper attribute/highlighting is applied and -->
0178       <!--to ensure that H6 headers won't be set as the "primary" region that was closed just because it was closed last -->
0179       <context name="close-sentinel-region" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop">
0180         <RegExpr attribute="Header H1" context="#pop" String="^#\s.*" column="0"/>
0181         <RegExpr attribute="Header H2" context="#pop" String="^##\s.*" column="0"/>
0182         <RegExpr attribute="Header H3" context="#pop" String="^###\s.*" column="0"/>
0183         <RegExpr attribute="Header H4" context="#pop" String="^####\s.*" column="0"/>
0184         <RegExpr attribute="Header H5" context="#pop" String="^#####\s.*" column="0"/>
0185       </context>
0186 
0187 
0188       <context name="find-strong-normal" attribute="Normal Text" lineEndContext="#pop">
0189         <RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und;|&strongemphasisregex_ast_und2;"/>
0190         <RegExpr attribute="Strong Text" context="#pop" minimal="true" String="&strongregex_ast;"/>
0191         <RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast;"/>
0192         <RegExpr attribute="Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_ast;"/>
0193         <DetectChar attribute="Normal Text" context="#pop" char="*"/>
0194       </context>
0195       <context name="find-emphasis-normal" attribute="Normal Text" lineEndContext="#pop">
0196         <RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und_ast;|&strongemphasisregex_und_ast2;"/>
0197         <RegExpr attribute="Strong Text" context="#pop" minimal="true" String="&strongregex_und;"/>
0198         <RegExpr attribute="Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_und;"/>
0199         <RegExpr attribute="Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_und;"/>
0200         <DetectChar attribute="Normal Text" context="#pop" char="_"/>
0201       </context>
0202 
0203       <!-- Blockquote -->
0204       <context name="blockquote" attribute="Blockquote: Normal Text" lineEndContext="#stay" lineEmptyContext="#pop">
0205         <IncludeRules context="default-blockquote-1"/>
0206         <!-- Find code block -->
0207         <RegExpr attribute="Normal Text" context="#pop!find-code-block" String="&emptyline;" column="0"/>
0208         <StringDetect attribute="Comment" context="#pop!find-code-block" String="&startcomment;" column="0" lookAhead="true"/>
0209         <IncludeRules context="default-blockquote-2"/>
0210       </context>
0211       <!-- Blockquote within a list -->
0212       <context name="blockquote-list" attribute="Blockquote: Normal Text" lineEndContext="#stay" lineEmptyContext="#pop">
0213         <IncludeRules context="default-blockquote-1"/>
0214         <!-- Don't find code block -->
0215         <RegExpr attribute="Normal Text" context="#pop" String="&emptyline;" column="0"/>
0216         <StringDetect attribute="Comment" context="#pop!comment" String="&startcomment;" firstNonSpace="true"/>
0217         <IncludeRules context="default-blockquote-2"/>
0218       </context>
0219 
0220       <context name="default-blockquote-1" attribute="Blockquote: Normal Text" lineEndContext="#stay">
0221         <DetectChar attribute="Blockquote" char="&gt;" firstNonSpace="true"/>
0222         <!-- End with header, horizontal rule or list/numlist -->
0223         <RegExpr context="#pop" String="^(?:\s*(?:&listbullet;|[\d]+\.)\s|#{1,6}\s|&rulerregex;)" column="0" lookAhead="true"/>
0224       </context>
0225       <context name="default-blockquote-2" attribute="Blockquote: Normal Text" lineEndContext="#stay">
0226         <!-- Strong, emphasis, strong-emphasis and strikethrough text -->
0227         <AnyChar context="find-strong-emphasis-blockquote" String="*_" lookAhead="true"/>
0228         <RegExpr attribute="Blockquote: Strikethrough Text" minimal="true" String="&strikeoutregex;"/>
0229         <!-- Common -->
0230         <IncludeRules context="inc"/>
0231         <RegExpr attribute="Blockquote: Link" String="&implicitlink;"/>
0232       </context>
0233       <context name="find-strong-emphasis-blockquote" attribute="Blockquote: Normal Text" lineEndContext="#pop">
0234         <RegExpr attribute="Blockquote: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und;|&strongemphasisregex_und_ast;|&strongemphasisregex_ast_und2;|&strongemphasisregex_und_ast2;"/>
0235         <RegExpr attribute="Blockquote: Strong Text" context="#pop" minimal="true" String="&strongregex_ast;|&strongregex_und;"/>
0236         <RegExpr attribute="Blockquote: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast;|&strongemphasisregex_und;"/>
0237         <RegExpr attribute="Blockquote: Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_ast;|&emphasisregex_und;"/>
0238         <AnyChar attribute="Blockquote: Normal Text" context="#pop" String="*_"/>
0239       </context>
0240 
0241       <!-- List and Numbered List -->
0242       <!-- NOTE: The indentation of the lists is captured. New paragraphs, code blocks, blockquotes or
0243            horizontal rules must have an indentation equal to or greater than the list, to be part of it. -->
0244       <!-- * list -->
0245       <context name="list" attribute="List: Normal Text" lineEndContext="#stay" fallthroughContext="content-list">
0246         <!-- Find indented code blocks, blockquotes and horizontal rules -->
0247         <RegExpr attribute="Code" String="^%1%2\s&indentedcodeblock;" column="0" dynamic="true"/>
0248         <RegExpr attribute="Blockquote" context="blockquote-list" String="^%1%2\s+&gt;" column="0" dynamic="true"/>
0249         <RegExpr attribute="Horizontal Rule" String="^%1%2\s+&rulerregex;" column="0" dynamic="true"/>
0250         <RegExpr String="&emptyline;" column="0"/>
0251         <!-- Text with the same indentation captured corresponds to the item list -->
0252         <RegExpr context="content-list" String="^%1%2\s" column="0" lookAhead="true" dynamic="true"/>
0253         <!-- Finish when the text has a lower indentation than the list -->
0254         <RegExpr context="#pop" String="^\s*\S" column="0" lookAhead="true"/>
0255         <!-- Highlight checkbox at the start of the item (task list) -->
0256         <RegExpr attribute="List: Checkbox" context="content-list" String="\s*&checkbox;"/>
0257       </context>
0258       <!-- 1. numlist (one digit) -->
0259       <context name="numlist" attribute="List: Normal Text" lineEndContext="#stay" fallthroughContext="content-list">
0260         <!-- Find indented code blocks, blockquotes and horizontal rules -->
0261         <RegExpr attribute="Code" String="^%1%2\s{2}&indentedcodeblock;" column="0" dynamic="true"/>
0262         <RegExpr attribute="Blockquote" context="blockquote-list" String="^%1%2\s{2,}&gt;" column="0" dynamic="true"/>
0263         <RegExpr attribute="Horizontal Rule" String="^%1%2\s{2,}&rulerregex;" column="0" dynamic="true"/>
0264         <RegExpr String="&emptyline;" column="0"/>
0265         <!-- Text with the same indentation captured -->
0266         <RegExpr context="content-list" String="^%1%2\s{2}" column="0" lookAhead="true" dynamic="true"/>
0267         <!-- Finish when the text has a lower indentation than the list -->
0268         <RegExpr context="#pop" String="^\s*\S" column="0" lookAhead="true"/>
0269       </context>
0270       <!-- 10. numlist (two or more digits) -->
0271       <context name="numlist2" attribute="List: Normal Text" lineEndContext="#stay" fallthroughContext="content-list">
0272         <!-- Find indented code blocks, blockquotes and horizontal rules -->
0273         <RegExpr attribute="Code" String="^%1%2\s{3}&indentedcodeblock;" column="0" dynamic="true"/>
0274         <RegExpr attribute="Blockquote" context="blockquote-list" String="^%1%2\s{3,}&gt;" column="0" dynamic="true"/>
0275         <RegExpr attribute="Horizontal Rule" String="^%1%2\s{3,}&rulerregex;" column="0" dynamic="true"/>
0276         <RegExpr String="&emptyline;" column="0"/>
0277         <!-- Text with the same indentation captured -->
0278         <RegExpr context="content-list" String="^%1%2\s{3}" column="0" lookAhead="true" dynamic="true"/>
0279         <!-- Finish when the text has a lower indentation than the list -->
0280         <RegExpr context="#pop" String="^\s*\S" column="0" lookAhead="true"/>
0281       </context>
0282 
0283       <!-- NOTE: Empty lines, blockquotes and horizontal rules send to contexts "list", "numlist" or "numlist2" (#pop),
0284            to check the indentation of the text and determine if the content of the list ends. -->
0285       <context name="content-list" attribute="List: Normal Text" lineEndContext="#stay" lineEmptyContext="#pop">
0286         <RegExpr context="#pop" String="&emptyline;" column="0"/>
0287         <!-- Blockquote and horzontal rule (check indentation) -->
0288         <RegExpr context="#pop" String="^\s*(?:&gt;|&rulerregex;)" column="0" lookAhead="true"/>
0289         <!-- End with header or new list/numlist -->
0290         <RegExpr context="#pop#pop" String="^(?:\s*(?:&listbullet;|[\d]+\.)\s|#{1,6}\s)" column="0" lookAhead="true"/>
0291         <!-- Strong, emphasis, strong-emphasis and strikethrough text -->
0292         <AnyChar context="find-strong-emphasis-list" String="*_" lookAhead="true"/>
0293         <RegExpr attribute="List: Strikethrough Text" minimal="true" String="&strikeoutregex;"/>
0294         <!-- Common -->
0295         <IncludeRules context="inc"/>
0296         <RegExpr attribute="List: Link" String="&implicitlink;"/>
0297       </context>
0298       <context name="find-strong-emphasis-list" attribute="List: Normal Text" lineEndContext="#pop">
0299         <RegExpr attribute="List: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast_und;|&strongemphasisregex_und_ast;|&strongemphasisregex_ast_und2;|&strongemphasisregex_und_ast2;"/>
0300         <RegExpr attribute="List: Strong Text" context="#pop" minimal="true" String="&strongregex_ast;|&strongregex_und;"/>
0301         <RegExpr attribute="List: Strong-Emphasis Text" context="#pop" minimal="true" String="&strongemphasisregex_ast;|&strongemphasisregex_und;"/>
0302         <RegExpr attribute="List: Emphasis Text" context="#pop" minimal="true" String="&emphasisregex_ast;|&emphasisregex_und;"/>
0303         <AnyChar attribute="List: Normal Text" context="#pop" String="*_"/>
0304       </context>
0305 
0306       <!-- Comments -->
0307       <context name="comment" attribute="Comment" lineEndContext="#stay">
0308         <StringDetect attribute="Comment" context="#pop" String="&endcomment;" endRegion="comment"/>
0309         <IncludeRules context="##Comments"/>
0310       </context>
0311 
0312       <!-- Fenced Code Blocks -->
0313       <context name="find-lang-fenced-code" attribute="Normal Text" lineEndContext="#pop">
0314         <!-- Apply syntax highlighting to fenced code blocks for some languages -->
0315         <RegExpr attribute="Fenced Code" context="#pop!code" String="&fcode;&end;"/>
0316         <RegExpr attribute="Fenced Code" context="#pop!bash-code" String="&fcode;\s*(?:bash(?:rc|_profile|_login|_logout)?|shell|sh|profile|PKGBUILD|APKBUILD|ebuild|eclass|nix)&end;" insensitive="true"/>
0317         <RegExpr attribute="Fenced Code" context="#pop!zsh-code" String="&fcode;\s*(?:zsh)&end;" insensitive="true"/>
0318         <RegExpr attribute="Fenced Code" context="#pop!cpp-code" String="&fcode;\s*(?:[ch]pp|[ch]\+\+|[ch]xx|h?cc|hh|cuh?|ino|pde|moc)&end;" insensitive="true"/>
0319         <RegExpr attribute="Fenced Code" context="#pop!csharp-code" String="&fcode;\s*(?:cs|csharp|c\#)&end;" insensitive="true"/>
0320         <RegExpr attribute="Fenced Code" context="#pop!cmake-code" String="&fcode;\s*(?:cmake|CMakeLists(?:\.txt)?)&end;" insensitive="true"/>
0321         <RegExpr attribute="Fenced Code" context="#pop!css-code" String="&fcode;\s*css&end;" insensitive="true"/>
0322         <RegExpr attribute="Fenced Code" context="#pop!c-code" String="&fcode;\s*[ch]&end;" insensitive="true"/>
0323         <RegExpr attribute="Fenced Code" context="#pop!doxygen-code" String="&fcode;\s*doxygen&end;" insensitive="true"/> <!-- Block comment of Doxygen -->
0324         <RegExpr attribute="Fenced Code" context="#pop!email-code" String="&fcode;\s*(?:email|emlx?|mbo?x)&end;" insensitive="true"/>
0325         <RegExpr attribute="Fenced Code" context="#pop!go-code" String="&fcode;\s*go(?:lang)?&end;" insensitive="true"/>
0326         <RegExpr attribute="Fenced Code" context="#pop!hamlet-code" String="&fcode;\s*[wxs]?hamlet&end;" insensitive="true"/> <!-- Included in the Haskell definition -->
0327         <RegExpr attribute="Fenced Code" context="#pop!haskell-code" String="&fcode;\s*(?:haskell|c?hs|hs\-boot)&end;" insensitive="true"/>
0328         <RegExpr attribute="Fenced Code" context="#pop!html-code" String="&fcode;\s*(?:[sx]?html?|inc|tmpl|tpl)&end;" insensitive="true"/>
0329         <RegExpr attribute="Fenced Code" context="#pop!java-code" String="&fcode;\s*(?:java|bsh)&end;" insensitive="true"/>
0330         <RegExpr attribute="Fenced Code" context="#pop!javascript-code" String="&fcode;\s*(?:javascript|m?js|es6|kwinscript|julius)&end;" insensitive="true"/>
0331         <RegExpr attribute="Fenced Code" context="#pop!jsx-code" String="&fcode;\s*(?:jsx|tsx|(?:java|type)script\-react)&end;" insensitive="true"/> <!-- Included in the HTML definition. Also apply for TSX. -->
0332         <RegExpr attribute="Fenced Code" context="#pop!json-code" String="&fcode;\s*(?:json5?|gltf)&end;" insensitive="true"/>
0333         <RegExpr attribute="Fenced Code" context="#pop!yaml-code" String="&fcode;\s*(?:ya?ml)&end;" insensitive="true"/>
0334         <RegExpr attribute="Fenced Code" context="#pop!matlab-code" String="&fcode;\s*matlab&end;" insensitive="true"/>
0335         <RegExpr attribute="Fenced Code" context="#pop!markdown-code" String="&fcode;\s*(?:markdown|m?md)&end;" insensitive="true"/>
0336         <RegExpr attribute="Fenced Code" context="#pop!mustache-code" String="&fcode;\s*(?:handlebars|hbs|mustache|mst|ractive|hogan|hulk)&end;" insensitive="true"/> <!-- Included in the HTML definition -->
0337         <RegExpr attribute="Fenced Code" context="#pop!perl-code" String="&fcode;\s*(?:perl|p[lm]|pod|psgi|vcl)&end;" insensitive="true"/>
0338         <RegExpr attribute="Fenced Code" context="#pop!php-code" String="&fcode;\s*(?:php[3457t]?|wml|phtml?|aw|ctp)&end;" insensitive="true"/>
0339         <RegExpr attribute="Fenced Code" context="#pop!python-code" String="&fcode;\s*(?:python[23]?|py[23w]?|[rc]py|sconstruct|gypi?)&end;" insensitive="true"/>
0340         <RegExpr attribute="Fenced Code" context="#pop!qml-code" String="&fcode;\s*qml(?:types)?&end;" insensitive="true"/>
0341         <RegExpr attribute="Fenced Code" context="#pop!r-code" String="&fcode;\s*(?:r|rprofile|rscript)&end;" insensitive="true"/>
0342         <RegExpr attribute="Fenced Code" context="#pop!raku-code" String="&fcode;\s*(?:raku(?:mod|doc|test)?|perl6|p[lm]?6|pod6|nqp)&end;" insensitive="true"/>
0343         <RegExpr attribute="Fenced Code" context="#pop!rest-code" String="&fcode;\s*(?:rst|rest|restructuredtext)&end;" insensitive="true"/> <!-- Included in the CMake definition -->
0344         <RegExpr attribute="Fenced Code" context="#pop!ruby-code" String="&fcode;\s*(?:ruby|rbx?|rjs|rake|f?cgi|gemspec|irbrc|ru|prawn|Appraisals|(?:Rake|Cap|Chef|Gem|Guard|Hobo|Vagrant||Rant|Berks|Thor|Puppet)file|rxml|(?:xml|js)\.erb)&end;" insensitive="true"/>
0345         <RegExpr attribute="Fenced Code" context="#pop!rust-code" String="&fcode;\s*(?:rust|rs)&end;" insensitive="true"/>
0346         <RegExpr attribute="Fenced Code" context="#pop!mysql-code" String="&fcode;\s*(?:mysql|sql|ddl)&end;" insensitive="true"/> <!-- Included in the PHP definition -->
0347         <RegExpr attribute="Fenced Code" context="#pop!nim-code" String="&fcode;\s*(?:nims?)&end;" insensitive="true"/>
0348         <RegExpr attribute="Fenced Code" context="#pop!typescript-code" String="&fcode;\s*(?:typescript|ts)&end;" insensitive="true"/>
0349         <RegExpr attribute="Fenced Code" context="#pop!xml-code" String="&fcode;\s*(?:xml|xsd|xspf|tld|jsp|c?pt|dtml|rss|opml|svg|daml|rdf|ui|kcfg|qrc|wsdl|scxml|xbel|dae|sch|brd|docbook)&end;" insensitive="true"/>
0350         <RegExpr attribute="Fenced Code" context="#pop!code" String="&fcode;.*$"/>
0351       </context>
0352       <context name="code" attribute="Code" lineEndContext="#stay"> <!-- Unknown language -->
0353         <RegExpr attribute="Fenced Code" context="#pop" String="%1[~`]*(?=&end;)" firstNonSpace="true" dynamic="true" endRegion="code-block"/>
0354       </context>
0355       <context attribute="Normal Text" lineEndContext="#stay" name="bash-code" fallthroughContext="Command##Bash">
0356         <IncludeRules context="code"/>
0357         <IncludeRules context="##Bash" includeAttrib="true"/>
0358       </context>
0359       <context attribute="Normal Text" lineEndContext="#stay" name="zsh-code" fallthroughContext="Command##Zsh">
0360         <IncludeRules context="code"/>
0361         <IncludeRules context="##Zsh" includeAttrib="true"/>
0362       </context>
0363       <context attribute="Normal Text" lineEndContext="#stay" name="cmake-code">
0364         <IncludeRules context="code"/>
0365         <IncludeRules context="##CMake" includeAttrib="true"/>
0366       </context>
0367       <context attribute="Normal Text" lineEndContext="#stay" name="c-code">
0368         <IncludeRules context="code"/>
0369         <IncludeRules context="##C" includeAttrib="true"/>
0370       </context>
0371       <context attribute="Normal Text" lineEndContext="#stay" name="cpp-code">
0372         <IncludeRules context="code"/>
0373         <IncludeRules context="##C++" includeAttrib="true"/>
0374       </context>
0375       <context attribute="Normal Text" lineEndContext="#stay" name="csharp-code">
0376         <IncludeRules context="code"/>
0377         <IncludeRules context="##C#" includeAttrib="true"/>
0378       </context>
0379       <context attribute="Normal Text" lineEndContext="#stay" name="css-code">
0380         <IncludeRules context="code"/>
0381         <IncludeRules context="##CSS" includeAttrib="true"/>
0382       </context>
0383       <context attribute="Normal Text" lineEndContext="#stay" name="doxygen-code">
0384         <IncludeRules context="code"/>
0385         <IncludeRules context="BlockComment##Doxygen" includeAttrib="true"/>
0386       </context>
0387       <context attribute="Normal Text" lineEndContext="#stay" name="email-code">
0388         <IncludeRules context="code"/>
0389         <IncludeRules context="##Email" includeAttrib="true"/>
0390       </context>
0391       <context attribute="Normal Text" lineEndContext="#stay" name="go-code">
0392         <IncludeRules context="code"/>
0393         <IncludeRules context="##Go" includeAttrib="true"/>
0394       </context>
0395       <context attribute="Normal Text" lineEndContext="#stay" name="hamlet-code">
0396         <IncludeRules context="code"/>
0397         <IncludeRules context="##Hamlet" includeAttrib="true"/>
0398       </context>
0399       <context attribute="Normal Text" lineEndContext="#stay" name="haskell-code">
0400         <IncludeRules context="code"/>
0401         <IncludeRules context="##Haskell" includeAttrib="true"/>
0402       </context>
0403       <context attribute="Normal Text" lineEndContext="#stay" name="html-code">
0404         <IncludeRules context="code"/>
0405         <IncludeRules context="##HTML" includeAttrib="true"/>
0406       </context>
0407       <context attribute="Normal Text" lineEndContext="#stay" name="java-code">
0408         <IncludeRules context="code"/>
0409         <IncludeRules context="##Java" includeAttrib="true"/>
0410       </context>
0411       <context attribute="Normal Text" lineEndContext="#stay" name="javascript-code">
0412         <IncludeRules context="code"/>
0413         <IncludeRules context="Normal##JavaScript" includeAttrib="true"/>
0414       </context>
0415       <context attribute="Normal Text" lineEndContext="#stay" name="jsx-code">
0416         <IncludeRules context="code"/>
0417         <IncludeRules context="Normal##JavaScript React (JSX)" includeAttrib="true"/>
0418       </context>
0419       <context attribute="Normal Text" lineEndContext="#stay" name="json-code">
0420         <IncludeRules context="code"/>
0421         <IncludeRules context="##JSON" includeAttrib="true"/>
0422       </context>
0423       <context attribute="Normal Text" lineEndContext="#stay" name="yaml-code">
0424         <IncludeRules context="code"/>
0425         <IncludeRules context="##YAML" includeAttrib="true"/>
0426       </context>
0427       <context attribute="Normal Text" lineEndContext="#stay" lineEmptyContext="find-code-block" name="markdown-code">
0428         <IncludeRules context="code"/>
0429         <IncludeRules context="Normal Text"/>
0430       </context>
0431       <context attribute="Normal Text" lineEndContext="#stay" name="matlab-code">
0432         <IncludeRules context="code"/>
0433         <IncludeRules context="##Matlab" includeAttrib="true"/>
0434       </context>
0435       <context attribute="Normal Text" lineEndContext="#stay" name="mustache-code">
0436         <IncludeRules context="code"/>
0437         <IncludeRules context="##Mustache/Handlebars (HTML)" includeAttrib="true"/>
0438       </context>
0439       <context attribute="Normal Text" lineEndContext="#stay" name="perl-code">
0440         <IncludeRules context="code"/>
0441         <IncludeRules context="##Perl" includeAttrib="true"/>
0442       </context>
0443       <context attribute="Normal Text" lineEndContext="#stay" name="php-code">
0444         <IncludeRules context="code"/>
0445         <IncludeRules context="phpsource##PHP/PHP" includeAttrib="true"/>
0446       </context>
0447       <context attribute="Normal Text" lineEndContext="#stay" name="python-code">
0448         <IncludeRules context="code"/>
0449         <IncludeRules context="##Python" includeAttrib="true"/>
0450       </context>
0451       <context attribute="Normal Text" lineEndContext="#stay" name="qml-code">
0452         <IncludeRules context="code"/>
0453         <IncludeRules context="Normal##QML" includeAttrib="true"/>
0454       </context>
0455       <context attribute="Normal Text" lineEndContext="#stay" name="r-code">
0456         <IncludeRules context="code"/>
0457         <IncludeRules context="##R Script" includeAttrib="true"/>
0458       </context>
0459       <context attribute="Normal Text" lineEndContext="#stay" name="raku-code">
0460         <IncludeRules context="code"/>
0461         <IncludeRules context="base##Raku" includeAttrib="true"/>
0462       </context>
0463       <context attribute="Normal Text" lineEndContext="#stay" name="rest-code">
0464         <IncludeRules context="code"/>
0465         <IncludeRules context="##reStructuredText" includeAttrib="true"/>
0466       </context>
0467       <context attribute="Normal Text" lineEndContext="#stay" name="ruby-code">
0468         <IncludeRules context="code"/>
0469         <IncludeRules context="##Ruby" includeAttrib="true"/>
0470       </context>
0471       <context attribute="Normal Text" lineEndContext="#stay" name="rust-code">
0472         <IncludeRules context="code"/>
0473         <IncludeRules context="##Rust" includeAttrib="true"/>
0474       </context>
0475       <context attribute="Normal Text" lineEndContext="#stay" name="mysql-code">
0476         <IncludeRules context="code"/>
0477         <IncludeRules context="##SQL (MySQL)" includeAttrib="true"/>
0478       </context>
0479       <context attribute="Normal Text" lineEndContext="#stay" name="nim-code">
0480         <IncludeRules context="code"/>
0481         <IncludeRules context="##Nim" includeAttrib="true"/>
0482       </context>
0483       <context attribute="Normal Text" lineEndContext="#stay" name="typescript-code">
0484         <IncludeRules context="code"/>
0485         <IncludeRules context="Normal##TypeScript" includeAttrib="true"/>
0486       </context>
0487       <context attribute="Normal Text" lineEndContext="#stay" name="xml-code">
0488         <IncludeRules context="code"/>
0489         <IncludeRules context="##XML" includeAttrib="true"/>
0490       </context>
0491 
0492       <!-- Common -->
0493       <context name="inc" attribute="Normal Text" lineEndContext="#stay">
0494         <!-- Code -->
0495         <RegExpr attribute="Code" String="`[^`]+`(?!`)|`{2}[^`](?:.*?[^`])?`{2}(?!`)|`{3}[^`](?:.*?[^`])?`{3}(?!`)|`{4}[^`](?:.*?[^`])?`{4}(?!`)|`{5,}[^`](?:.*?[^`])?`{5,}"/>
0496         <!-- Find Fenced Code Block -->
0497         <RegExpr attribute="Fenced Code" context="find-lang-fenced-code" String="`{3,}(?=[^`]*$)|~{3,}(?=[^~]*$)" firstNonSpace="true" lookAhead="true" beginRegion="code-block"/>
0498         <!-- Comment -->
0499         <StringDetect attribute="Comment" context="comment" String="&startcomment;" beginRegion="comment"/>
0500         <!-- Links and References -->
0501         <RegExpr attribute="Reference-Link Target" context="reflinktarget" String="&reflinktargetregex;" firstNonSpace="true"/>
0502         <RegExpr attribute="Footnote" String="&footnoteregex;"/>
0503         <RegExpr attribute="Reference-Link" context="find-reflink" String="&reflinkregex;"/>
0504         <RegExpr attribute="Inline Image" context="inlineimage" String="&inlineimageregex;"/>
0505         <RegExpr attribute="Reference Image" String="&refimageregex;"/>
0506         <RegExpr attribute="Auto-Link" context="autolink" String="&autolinkregex;" lookAhead="true"/>
0507         <RegExpr attribute="Mailto-Link" context="mailtolink" String="&mailtolinkregex;"/>
0508         <!-- Line Break -->
0509         <RegExpr attribute="Line Break" minimal="true" String="&linebreakregex;"/>
0510         <!-- Backslash Escapes -->
0511         <Detect2Chars attribute="Backslash Escape" char="\" char1="\"/>
0512         <Detect2Chars attribute="Backslash Escape" char="\" char1="`"/>
0513         <Detect2Chars attribute="Backslash Escape" char="\" char1="*"/>
0514         <Detect2Chars attribute="Backslash Escape" char="\" char1="_"/>
0515         <Detect2Chars attribute="Backslash Escape" char="\" char1="{"/>
0516         <Detect2Chars attribute="Backslash Escape" char="\" char1="}"/>
0517         <Detect2Chars attribute="Backslash Escape" char="\" char1="["/>
0518         <Detect2Chars attribute="Backslash Escape" char="\" char1="]"/>
0519         <Detect2Chars attribute="Backslash Escape" char="\" char1="("/>
0520         <Detect2Chars attribute="Backslash Escape" char="\" char1=")"/>
0521         <Detect2Chars attribute="Backslash Escape" char="\" char1="#"/>
0522         <Detect2Chars attribute="Backslash Escape" char="\" char1="+"/>
0523         <Detect2Chars attribute="Backslash Escape" char="\" char1="-"/>
0524         <Detect2Chars attribute="Backslash Escape" char="\" char1="."/>
0525         <Detect2Chars attribute="Backslash Escape" char="\" char1="!"/>
0526         <Detect2Chars attribute="Backslash Escape" char="\" char1="&lt;"/>
0527         <Detect2Chars attribute="Backslash Escape" char="\" char1="&gt;"/>
0528         <Detect2Chars attribute="Backslash Escape" char="\" char1="&amp;"/>
0529         <!-- Inline HTML -->
0530         <RegExpr attribute="EntityRef" String="&amp;(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&htmlname;);"/>
0531         <RegExpr context="find-html-block" String="&lt;/?&htmlname;(?:[\s&gt;]|/&gt;|$)" lookAhead="true"/>
0532       </context>
0533       <context name="find-html-block" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop">
0534         <IncludeRules context="FindSpecialHTMLTags##HTML"/>
0535         <IncludeRules context="FindHTMLTags##HTML"/>
0536       </context>
0537 
0538       <!-- Links and email: <https://example.com>, <example@kde.org> -->
0539       <context name="autolink" attribute="Auto-Link" lineEndContext="#pop" fallthroughContext="#pop">
0540         <DetectChar attribute="Auto-Link" char="&lt;"/>
0541         <DetectChar attribute="Auto-Link" context="#pop" char="&gt;"/>
0542         <RegExpr attribute="Link" String="&startlink;[^&quot;&gt;\s]+"/>
0543       </context>
0544       <context name="mailtolink" attribute="Email" lineEndContext="#pop">
0545         <DetectChar attribute="Mailto-Link" context="#pop" char="&gt;"/>
0546       </context>
0547 
0548       <!-- References: [example][id], [example](http://example.com) -->
0549       <context name="find-reflink" attribute="Reference-Link Name" lineEndContext="#pop">
0550         <Detect2Chars attribute="Reference-Link Name" char="\" char1="]"/>
0551         <RegExpr attribute="Reference-Link" context="#pop!find-reflink-id" String="\](?=&reflinkidregex;)"/> <!-- Find id -->
0552         <DetectChar attribute="Reference-Link" context="#pop" char="]"/>
0553         <!-- Image as link or reference -->
0554         <RegExpr attribute="Inline Image" context="inlineimage" String="&startinlineimage;(?=&endinlineimage;&refchar;*\])"/>
0555         <RegExpr attribute="Reference Image" String="&refimageregex;(?=&refchar;*\])"/>
0556         <RegExpr attribute="Reference-Link Name" context="#stay" String="(?:\[(?:\\.|[^\[\]\\])*\](?:\\.|[^\[\]\\])*)+(?=\])" minimal="true"/>
0557       </context>
0558       <context name="find-reflink-id" attribute="Reference-Link" lineEndContext="#pop">
0559         <DetectSpaces />
0560         <!-- Ref.: [an example][id] "Optional title" -->
0561         <DetectChar attribute="Reference-Link" context="#pop!reflink-id" char="["/>
0562         <!-- Inline Ref.: [an example](http://example.com/ "Title") -->
0563         <DetectChar attribute="Reference-Link" context="#pop!reflink-inline-id" char="("/>
0564       </context>
0565       <context name="reflink-inline-id" attribute="Reference-Link" lineEndContext="#pop">
0566         <Detect2Chars attribute="Reference-Link" char="\" char1=")"/>
0567         <DetectChar attribute="Reference-Link" context="#pop" char=")"/>
0568         <RegExpr attribute="Reference-Link: Link" String="\b&startlink;(?:\\.|[^&quot;&gt;\s\)\\])+"/>
0569         <RegExpr attribute="Reference-Link: Email" String="\b&email;\b"/>
0570       </context>
0571       <context name="reflink-id" attribute="Reference-Link ID" lineEndContext="#pop">
0572         <Detect2Chars attribute="Reference-Link ID" char="\" char1="]"/>
0573         <DetectChar attribute="Reference-Link" context="#pop!reflink-title" char="]"/>
0574         <RegExpr attribute="Reference-Link: Link" String="\b&startlink;(?:\\.|[^&quot;&gt;\s\]\\])+"/>
0575       </context>
0576       <!-- [an example][id] "title" -->
0577       <context name="reflink-title" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop">
0578         <RegExpr attribute="Reference-Link" context="#pop" String="\s+&quot;(?:\\.|[^&quot;\\])*&quot;"/>
0579       </context>
0580 
0581       <!-- Target Ref.: [foo]: http://example.com/  "Optional Title Here" -->
0582       <context name="reflinktarget" attribute="Reference-Link Target" lineEndContext="#pop" fallthroughContext="#pop">
0583         <RegExpr attribute="Reference-Link Target: Link" context="#pop!reflinktarget-title" String="\s*&link;(?=\s|$)"/>
0584         <RegExpr attribute="Reference-Link Target" context="#pop!reflinktarget-link" String="\s*&lt;(?=&link;&gt;(?:\s|$))"/>
0585         <RegExpr attribute="Reference-Link Target" context="#pop!reflinktarget-title" String="\s*#[\w\.\:\-]+\b"/>
0586       </context>
0587       <context name="reflinktarget-link" attribute="Reference-Link Target" lineEndContext="#pop" fallthroughContext="#pop">
0588         <DetectChar attribute="Reference-Link Target" context="#pop!reflinktarget-title" char="&gt;"/>
0589         <RegExpr attribute="Reference-Link Target: Link" String="&link;"/>
0590       </context>
0591       <context name="reflinktarget-title" attribute="Reference-Link Target" lineEndContext="#pop" fallthroughContext="#pop">
0592         <DetectSpaces attribute="Reference-Link Target"/>
0593         <RegExpr attribute="Reference-Link Target" context="#pop" String="&quot;(?:\\.|[^&quot;\\])*&quot;|&apos;(?:\\.|[^&apos;\\])*&apos;|\((?:\\.|[^\)\\])*\)"/>
0594       </context>
0595 
0596       <!-- Image -->
0597       <context name="inlineimage" attribute="Inline Image" lineEndContext="#pop">
0598         <DetectChar attribute="Inline Image" context="#pop" char=")"/>
0599         <Detect2Chars attribute="Inline Image" char="\" char1=")"/>
0600         <RegExpr attribute="Inline Image: Link" String="\b&startlink;(?:\\.|[^&quot;&gt;\s\)\\])+"/>
0601       </context>
0602     </contexts>
0603     <itemDatas>
0604       <itemData name="Normal Text" defStyleNum="dsNormal"/>
0605       <itemData name="Emphasis Text" defStyleNum="dsNormal" italic="true"/>
0606       <itemData name="Strong Text" defStyleNum="dsNormal" bold="true"/>
0607       <itemData name="Strong-Emphasis Text" defStyleNum="dsNormal" italic="true" bold="true"/>
0608       <itemData name="Strikethrough Text" defStyleNum="dsNormal" strikeOut="true"/>
0609       <itemData name="Normal Text: Link" defStyleNum="dsNormal" underline="true" spellChecking="false"/>
0610       <itemData name="Horizontal Rule" defStyleNum="dsNormal" bold="true" spellChecking="false"/>
0611       <itemData name="Line Break" defStyleNum="dsNormal" underline="true" color="#999999" spellChecking="false"/>
0612       <itemData name="Header H1" defStyleNum="dsFunction" bold="true"/>
0613       <itemData name="Header H2" defStyleNum="dsFunction" bold="true"/>
0614       <itemData name="Header H3" defStyleNum="dsFunction" bold="true"/>
0615       <itemData name="Header H4" defStyleNum="dsFunction" bold="true"/>
0616       <itemData name="Header H5" defStyleNum="dsFunction" bold="true"/>
0617       <itemData name="Header H6" defStyleNum="dsFunction" bold="true"/>
0618       <itemData name="Blockquote" defStyleNum="dsAttribute" spellChecking="false"/>
0619       <itemData name="Blockquote: Normal Text" defStyleNum="dsAttribute"/>
0620       <itemData name="Blockquote: Emphasis Text" defStyleNum="dsAttribute" italic="true"/>
0621       <itemData name="Blockquote: Strong Text" defStyleNum="dsAttribute" bold="true"/>
0622       <itemData name="Blockquote: Strong-Emphasis Text" defStyleNum="dsAttribute" italic="true" bold="true"/>
0623       <itemData name="Blockquote: Strikethrough Text" defStyleNum="dsAttribute" strikeOut="true"/>
0624       <itemData name="Blockquote: Link" defStyleNum="dsAttribute" underline="true" spellChecking="false"/>
0625       <itemData name="List" defStyleNum="dsSpecialString" bold="1" spellChecking="false"/>
0626       <itemData name="Number List" defStyleNum="dsSpecialString" spellChecking="false"/>
0627       <itemData name="List: Normal Text" defStyleNum="dsNormal"/>
0628       <itemData name="List: Emphasis Text" defStyleNum="dsNormal" italic="true"/>
0629       <itemData name="List: Strong Text" defStyleNum="dsNormal" bold="true"/>
0630       <itemData name="List: Strong-Emphasis Text" defStyleNum="dsNormal" italic="true" bold="true"/>
0631       <itemData name="List: Strikethrough Text" defStyleNum="dsNormal" strikeOut="true"/>
0632       <itemData name="List: Link" defStyleNum="dsNormal" underline="true" spellChecking="false"/>
0633       <itemData name="List: Checkbox" defStyleNum="dsVariable" spellChecking="false"/>
0634       <itemData name="Comment" defStyleNum="dsComment"/>
0635       <itemData name="Code" defStyleNum="dsInformation"/>
0636       <itemData name="Fenced Code" defStyleNum="dsInformation" spellChecking="false"/>
0637       <itemData name="Auto-Link" defStyleNum="dsOthers" spellChecking="false"/>
0638       <itemData name="Link" defStyleNum="dsOthers" underline="true" spellChecking="false"/>
0639       <itemData name="Mailto-Link" defStyleNum="dsOthers" spellChecking="false"/>
0640       <itemData name="Email" defStyleNum="dsOthers" italic="true" underline="true" spellChecking="false"/>
0641       <itemData name="Footnote" defStyleNum="dsOthers" italic="true"/>
0642       <itemData name="Reference-Link" defStyleNum="dsComment" italic="false"/>
0643       <itemData name="Reference-Link Name" defStyleNum="dsOthers" underline="true" italic="false"/>
0644       <itemData name="Reference-Link ID" defStyleNum="dsComment" italic="false"/>
0645       <itemData name="Reference-Link: Link" defStyleNum="dsComment" underline="true" italic="false" spellChecking="false"/>
0646       <itemData name="Reference-Link: Email" defStyleNum="dsComment" italic="true" underline="true" spellChecking="false"/>
0647       <itemData name="Reference-Link Target" defStyleNum="dsOthers" italic="false" bold="false"/>
0648       <itemData name="Reference-Link Target: Link" defStyleNum="dsOthers" underline="true" spellChecking="false"/>
0649       <itemData name="Inline Image" defStyleNum="dsAlert" italic="false" bold="false"/>
0650       <itemData name="Reference Image" defStyleNum="dsAlert" italic="false" bold="false"/>
0651       <itemData name="Inline Image: Link" defStyleNum="dsAlert" italic="false" bold="false" underline="true"/>
0652       <itemData name="Metadata Title" defStyleNum="dsAnnotation"/>
0653       <itemData name="Metadata" defStyleNum="dsComment" italic="0"/>
0654       <itemData name="Backslash Escape" defStyleNum="dsSpecialChar" spellChecking="false"/>
0655       <itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false"/>
0656     </itemDatas>
0657   </highlighting>
0658   <general>
0659     <keywords additionalDeliminator="`"/>
0660     <comments>
0661       <comment name="multiLine" start="&startcomment;" end="&endcomment;" region="comment"/>
0662     </comments>
0663   </general>
0664 </language>
0665 <!-- kate: replace-tabs on; indent-width 2; tab-width 2; -->