Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/rest.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd" | 2 | <!DOCTYPE language SYSTEM "language.dtd" | ||
3 | [ | 3 | [ | ||
4 | <!ENTITY inlinestart "(^|[-\s'"\(\[{</:‘“’«¡¿‐‑‒–— ])"> | 4 | <!ENTITY inlinestart "(^|[-\s'"\(\[{</:‘“’«¡¿‐‑‒–— ])"> | ||
5 | <!ENTITY inlineend "(?=[-\s’”»‐‑‒–— '"\)\]}>/:\.,;!\?\\]|$)"> | 5 | <!ENTITY inlineend "(?=[-\s’”»‐‑‒–— '"\)\]}>/:\.,;!\?\\]|$)"> | ||
6 | <!ENTITY SimpleReferenceNameChars "\w_\.:\+\-"> | 6 | <!ENTITY SimpleReferenceNameChars "\w_\.:\+\-"> | ||
7 | | ||||
8 | <!-- Keep in sync with Markdown --> | ||||
9 | <!ENTITY startlink "(?:https?|ftp)\://"> | ||||
7 | ]> | 10 | ]> | ||
8 | <!-- | 11 | <!-- | ||
9 | This file is part of KDE's kate project. | 12 | This file is part of KDE's kate project. | ||
10 | 13 | | |||
11 | Copyright 2010 Matt Williams (matt@milliams.com) | 14 | Copyright 2010 Matt Williams (matt@milliams.com) | ||
12 | Copyright 2014 Matthew Woehlke (mw_triad@users.sourceforge.net) | 15 | Copyright 2014 Matthew Woehlke (mw_triad@users.sourceforge.net) | ||
13 | --> | 16 | --> | ||
14 | <language name="reStructuredText" extensions="*.rst" section="Markup" mimetype="text/x-rst" version="5" kateversion="2.4" casesensitive="1"> | 17 | <language name="reStructuredText" extensions="*.rst" section="Markup" mimetype="text/x-rst" version="5" kateversion="2.4" casesensitive="1"> | ||
Show All 10 Lines | 22 | <context name="Normal" attribute="Normal" lineEndContext="#stay"> | |||
25 | <RegExpr attribute="HyperlinkTarget" context="#stay" String="^\s*(\.\. (__:|_[&SimpleReferenceNameChars; ]+:(\s|$))|__ )" minimal="true" column="0"/> | 28 | <RegExpr attribute="HyperlinkTarget" context="#stay" String="^\s*(\.\. (__:|_[&SimpleReferenceNameChars; ]+:(\s|$))|__ )" minimal="true" column="0"/> | ||
26 | <StringDetect attribute="Code" String=".. code-block::" context="CodeBlock" firstNonSpace="true"/> | 29 | <StringDetect attribute="Code" String=".. code-block::" context="CodeBlock" firstNonSpace="true"/> | ||
27 | <StringDetect attribute="Code" String=".. code::" context="CodeBlock" firstNonSpace="true"/> | 30 | <StringDetect attribute="Code" String=".. code::" context="CodeBlock" firstNonSpace="true"/> | ||
28 | <RegExpr attribute="Directive" context="#stay" String="^\s*\.\. ([\w\-_\.]+)(:[\w\-_\.]+)*::(\s|$)" minimal="true" column="0"/> | 31 | <RegExpr attribute="Directive" context="#stay" String="^\s*\.\. ([\w\-_\.]+)(:[\w\-_\.]+)*::(\s|$)" minimal="true" column="0"/> | ||
29 | <RegExpr attribute="Code" String="::$" context="CodeBlock" /> | 32 | <RegExpr attribute="Code" String="::$" context="CodeBlock" /> | ||
30 | <RegExpr attribute="SubstitutionDefinition" context="#stay" String="^\s*\.\. \|[&SimpleReferenceNameChars; ]+\|\s+[&SimpleReferenceNameChars;]+::\s" minimal="true" column="0"/> | 33 | <RegExpr attribute="SubstitutionDefinition" context="#stay" String="^\s*\.\. \|[&SimpleReferenceNameChars; ]+\|\s+[&SimpleReferenceNameChars;]+::\s" minimal="true" column="0"/> | ||
31 | <RegExpr attribute="Field" String=":(?=([^:]*\\:)*[^:]*:(\s|$))" context="Field" firstNonSpace="true"/> | 34 | <RegExpr attribute="Field" String=":(?=([^:]*\\:)*[^:]*:(\s|$))" context="Field" firstNonSpace="true"/> | ||
32 | <RegExpr attribute="Comment" context="Comment" String="^(\s*)\.\.(\s|$)(?!([\w\-_\.]+)(:[\w\-_\.]+)*::(\s|$))" column="0"/> | 35 | <RegExpr attribute="Comment" context="Comment" String="^(\s*)\.\.(\s|$)(?!([\w\-_\.]+)(:[\w\-_\.]+)*::(\s|$))" column="0"/> | ||
36 | | ||||
37 | <!-- Keep in sync with Markdown’s implicitlink entity --> | ||||
38 | <RegExpr attribute="StandaloneHyperlink" context="#stay" String="\b&startlink;[^">\s`\)]*[^\s!"'`\(\)\*,\.:;<>\?~\]\}\\](?=[[:punct:]]*(?:[\s\)]|$))" /> | ||||
39 | | ||||
33 | </context> | 40 | </context> | ||
34 | 41 | | |||
35 | <context name="InlineMarkup" attribute="Normal" lineEndContext="#stay"> | 42 | <context name="InlineMarkup" attribute="Normal" lineEndContext="#stay"> | ||
36 | <RegExpr attribute="InlineLiteral" context="#stay" String="&inlinestart;``[^\s].*``&inlineend;" minimal="true"/> | 43 | <RegExpr attribute="InlineLiteral" context="#stay" String="&inlinestart;``[^\s].*``&inlineend;" minimal="true"/> | ||
37 | <RegExpr attribute="SubstitutionReference" context="#stay" String="&inlinestart;\|[^\s].*\|&inlineend;" minimal="true"/> | 44 | <RegExpr attribute="SubstitutionReference" context="#stay" String="&inlinestart;\|[^\s].*\|&inlineend;" minimal="true"/> | ||
38 | <RegExpr attribute="InlineInternalTarget" context="#stay" String="&inlinestart;_`[^\s].*`&inlineend;" minimal="true"/> | 45 | <RegExpr attribute="InlineInternalTarget" context="#stay" String="&inlinestart;_`[^\s].*`&inlineend;" minimal="true"/> | ||
39 | <RegExpr attribute="FootnoteReference" context="#stay" String="&inlinestart;\[[&SimpleReferenceNameChars;]+\]_&inlineend;" minimal="true"/> | 46 | <RegExpr attribute="FootnoteReference" context="#stay" String="&inlinestart;\[[&SimpleReferenceNameChars;]+\]_&inlineend;" minimal="true"/> | ||
40 | <RegExpr attribute="HyperlinkReference" context="#stay" String="&inlinestart;(`[^\s].*`|\w+)_&inlineend;" minimal="true"/> | 47 | <RegExpr attribute="HyperlinkReference" context="#stay" String="&inlinestart;(`[^\s].*`|\w+)_&inlineend;" minimal="true"/> | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 85 | <itemDatas> | |||
92 | <itemData name="Citation" defStyleNum="dsDataType" /> | 99 | <itemData name="Citation" defStyleNum="dsDataType" /> | ||
93 | <itemData name="HyperlinkTarget" defStyleNum="dsDataType" /> | 100 | <itemData name="HyperlinkTarget" defStyleNum="dsDataType" /> | ||
94 | <itemData name="Directive" defStyleNum="dsDataType" /> | 101 | <itemData name="Directive" defStyleNum="dsDataType" /> | ||
95 | <itemData name="SubstitutionDefinition" defStyleNum="dsDataType" /> | 102 | <itemData name="SubstitutionDefinition" defStyleNum="dsDataType" /> | ||
96 | <itemData name="Role" defStyleNum="dsKeyword" /> | 103 | <itemData name="Role" defStyleNum="dsKeyword" /> | ||
97 | <itemData name="DefaultRole" defStyleNum="dsDecVal" /> | 104 | <itemData name="DefaultRole" defStyleNum="dsDecVal" /> | ||
98 | <itemData name="Code" defStyleNum="dsDataType" /> | 105 | <itemData name="Code" defStyleNum="dsDataType" /> | ||
99 | <itemData name="Comment" defStyleNum="dsComment" /> | 106 | <itemData name="Comment" defStyleNum="dsComment" /> | ||
107 | <itemData name="StandaloneHyperlink" defStyleNum="dsOthers" /> | ||||
100 | </itemDatas> | 108 | </itemDatas> | ||
101 | 109 | | |||
102 | </highlighting> | 110 | </highlighting> | ||
103 | 111 | | |||
104 | <general> | 112 | <general> | ||
105 | <folding indentationsensitive="true" /> | 113 | <folding indentationsensitive="true" /> | ||
106 | <comments> | 114 | <comments> | ||
107 | <comment name="singleLine" start=".."/> | 115 | <comment name="singleLine" start=".."/> | ||
108 | </comments> | 116 | </comments> | ||
109 | </general> | 117 | </general> | ||
110 | 118 | | |||
111 | </language> | 119 | </language> |