File: rest.xml

package info (click to toggle)
haskell-skylighting-core 0.14.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,440 kB
  • sloc: xml: 118,808; haskell: 3,117; cs: 72; ada: 67; java: 37; ansic: 32; cpp: 31; php: 25; tcl: 19; lisp: 14; perl: 11; makefile: 5
file content (120 lines) | stat: -rw-r--r-- 7,357 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language
[
        <!ENTITY inlinestart "(?:^|(?&lt;=[-\s&apos;&quot;\(\[{&lt;/:‘“’«¡¿‐‑‒–— ]))">
        <!ENTITY inlineend "(?=[-\s’”»‐‑‒–— &apos;&quot;\)\]}&gt;/:\.,;!\?\\]|$)">
        <!ENTITY SimpleReferenceNameChars "\w_\.:\+\-">

        <!-- Keep in sync with Markdown -->
        <!ENTITY startlink "(?:https?|ftp)\://">
]>
<!--
  This file is part of KDE's kate project.

  Copyright 2010 Matt Williams (matt@milliams.com)
  Copyright 2014 Matthew Woehlke (mw_triad@users.sourceforge.net)
  -->
<language name="reStructuredText" extensions="*.rst" section="Markup" mimetype="text/x-rst" version="10" kateversion="5.0" casesensitive="1">

  <highlighting>

    <contexts>
      <context name="Normal" attribute="Normal" lineEndContext="#stay">
        <RegExpr attribute="Bold" context="#stay" String="&inlinestart;\*\*[^\s].*\*\*&inlineend;" minimal="true"/>
        <RegExpr attribute="Italic" context="#stay" String="&inlinestart;\*[^\s].*\*&inlineend;" minimal="true"/>
        <IncludeRules context="InlineMarkup"/>
        <RegExpr attribute="Footnote" context="#stay" String="^\s*\.\. \[(\d+|#|\*|#[&SimpleReferenceNameChars;]+)\]\s" minimal="true" column="0"/>
        <RegExpr attribute="Citation" context="#stay" String="^\s*\.\. \[[&SimpleReferenceNameChars;]+\]\s" minimal="true" column="0"/>
        <RegExpr attribute="HyperlinkTarget" context="#stay" String="^\s*(\.\. (__:|_[&SimpleReferenceNameChars; ]+:(\s|$))|__ )" minimal="true" column="0"/>
        <StringDetect attribute="Code" String=".. code-block::" context="CodeBlock" firstNonSpace="true"/>
        <StringDetect attribute="Code" String=".. code::" context="CodeBlock" firstNonSpace="true"/>
        <RegExpr attribute="Directive" context="#stay" String="^\s*\.\. ([\w\-_\.]+)(:[\w\-_\.]+)*::(\s|$)" minimal="true" column="0"/>
        <RegExpr attribute="Code" String="::$" context="CodeBlock" />
        <RegExpr attribute="SubstitutionDefinition" context="#stay" String="^\s*\.\. \|[&SimpleReferenceNameChars; ]+\|\s+[&SimpleReferenceNameChars;]+::\s" minimal="true" column="0"/>
        <RegExpr attribute="Field" String=":(?=([^:]*\\:)*[^:]*:(\s|$))" context="Field" firstNonSpace="true"/>
        <RegExpr attribute="Comment" context="Comment" String="^(\s*)\.\.(?:\s|$)(?![\w\-_\.]+(?::[\w\-_\.]+)*::(?:\s|$))" column="0"/>

        <!-- Keep in sync with Markdown’s implicitlink entity -->
        <RegExpr attribute="StandaloneHyperlink" context="#stay" String="\b&startlink;[^&quot;&gt;\s`\)]*[^\s!&quot;&apos;`\(\)\*,\.:;&lt;&gt;\?~\]\}\\](?=[[:punct:]]*(?:[\s\)]|$))" />

      </context>

      <context name="InlineMarkup" attribute="Normal" lineEndContext="#stay">
        <RegExpr attribute="InlineLiteral" context="#stay" String="&inlinestart;``[^\s].*``&inlineend;" minimal="true"/>
        <RegExpr attribute="SubstitutionReference" context="#stay" String="&inlinestart;\|[^\s].*\|&inlineend;" minimal="true"/>
        <RegExpr attribute="InlineInternalTarget" context="#stay" String="&inlinestart;_`[^\s].*`&inlineend;" minimal="true"/>
        <RegExpr attribute="FootnoteReference" context="#stay" String="&inlinestart;\[[&SimpleReferenceNameChars;]+\]_&inlineend;" minimal="true"/>
        <RegExpr attribute="HyperlinkReference" context="#stay" String="&inlinestart;(`[^\s].*`|\w+)_{1,2}&inlineend;" minimal="true"/>
        <RegExpr attribute="InterpretedText" context="TrailingRole" String="&inlinestart;`[^\s].*`(?=:([\w\-_\.\+]+)(:[\w\-_\.\+]+)*:)" minimal="true"/>
        <RegExpr attribute="Role" String=":([\w\-_\.\+]+)(:[\w\-_\.\+]+)*:(?=`)" context="Role"/>
        <RegExpr attribute="DefaultRole" context="#stay" String="&inlinestart;`[^\s].*`&inlineend;" minimal="true"/>
      </context>

      <context name="Field" attribute="Field" lineEndContext="#stay">
        <DetectChar attribute="Field" context="#pop" char=":"/>
        <Detect2Chars attribute="Field" context="#stay" char="\" char1=":"/>
        <RegExpr attribute="FieldBold" context="#stay" String="&inlinestart;\*\*[^\s].*\*\*&inlineend;" minimal="true"/>
        <RegExpr attribute="FieldItalic" context="#stay" String="&inlinestart;\*[^\s].*\*&inlineend;" minimal="true"/>
        <IncludeRules context="InlineMarkup"/>
      </context>
      <context name="InterpretedText" attribute="InterpretedText" lineEndContext="#pop">
        <DetectChar attribute="InterpretedText" char="`" context="#pop" />
      </context>
      <context name="Role" attribute="Role" lineEndContext="#pop">
        <DetectChar attribute="InterpretedText" char="`" context="#pop!InterpretedText" />
      </context>
      <context name="TrailingRole" attribute="Role" lineEndContext="#pop">
        <RegExpr attribute="Role" String=":[\w\-_\.\+]+:" context="#pop"/>
      </context>
      <context name="Comment" attribute="Comment" lineEndContext="#stay" dynamic="true">
        <StringDetect attribute="Code" String="%1   " context="#stay" column="0" dynamic="true"/>
        <RegExpr attribute="Normal" String="^." lookAhead="true" column="0" context="#pop"/>
        <IncludeRules context="##Comments"/>
      </context>

      <context name="CodeBlock" attribute="Code" lineEndContext="#stay">
        <RegExpr attribute="Code" String="^(\s+)(?=\S)" context="Code" column="0"/>
      </context>

      <context name="Code" attribute="Code" lineEndContext="#stay" dynamic="true">
        <StringDetect attribute="Code" String="%1" context="#stay" column="0" dynamic="true"/>
        <RegExpr attribute="Normal" String="^." lookAhead="true" context="#pop#pop" column="0"/>
      </context>
    </contexts>

    <itemDatas>
      <itemData name="Normal" defStyleNum="dsNormal" />
      <itemData name="Bold" defStyleNum="dsNormal" bold="1" />
      <itemData name="Italic" defStyleNum="dsNormal" italic="1" />
      <itemData name="InlineLiteral" defStyleNum="dsDataType" />
      <itemData name="SubstitutionReference" defStyleNum="dsFunction" />
      <itemData name="InlineInternalTarget" defStyleNum="dsFunction" />
      <itemData name="FootnoteReference" defStyleNum="dsOthers" />
      <itemData name="InterpretedText" defStyleNum="dsDecVal" />
      <itemData name="HyperlinkReference" defStyleNum="dsOthers" />
      <itemData name="Field" defStyleNum="dsFunction" />
      <itemData name="FieldBold" defStyleNum="dsFunction" bold="1" />
      <itemData name="FieldItalic" defStyleNum="dsFunction" italic="1" />
      <itemData name="Footnote" defStyleNum="dsDataType" />
      <itemData name="Citation" defStyleNum="dsDataType" />
      <itemData name="HyperlinkTarget" defStyleNum="dsDataType" />
      <itemData name="Directive" defStyleNum="dsDataType" />
      <itemData name="SubstitutionDefinition" defStyleNum="dsDataType" />
      <itemData name="Role" defStyleNum="dsKeyword" />
      <itemData name="DefaultRole" defStyleNum="dsDecVal" />
      <itemData name="Code" defStyleNum="dsDataType" />
      <itemData name="Comment" defStyleNum="dsComment" />
      <itemData name="StandaloneHyperlink" defStyleNum="dsOthers" />
    </itemDatas>

  </highlighting>

  <general>
    <folding indentationsensitive="true" />
    <comments>
      <comment name="singleLine" start=".."/>
    </comments>
  </general>

</language>
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->