Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/markdown.xml
Show All 29 Lines | |||||
30 | <!ENTITY autolinkregex '<(https?|ftp):[^\">\s]+>'> | 30 | <!ENTITY autolinkregex '<(https?|ftp):[^\">\s]+>'> | ||
31 | <!ENTITY mailtolinkregex "<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>"> | 31 | <!ENTITY mailtolinkregex "<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>"> | ||
32 | <!ENTITY rulerregex "\s*([\*\-_]\s?){3,}\s*"> | 32 | <!ENTITY rulerregex "\s*([\*\-_]\s?){3,}\s*"> | ||
33 | <!-- two spaces at end of line generates linebreak --> | 33 | <!-- two spaces at end of line generates linebreak --> | ||
34 | <!ENTITY linebreakregex " $"> | 34 | <!ENTITY linebreakregex " $"> | ||
35 | <!ENTITY strikeoutregex "[~]{2}[^~].*[^~][~]{2}"> | 35 | <!ENTITY strikeoutregex "[~]{2}[^~].*[^~][~]{2}"> | ||
36 | <!-- pandoc style --> | 36 | <!-- pandoc style --> | ||
37 | ]> | 37 | ]> | ||
38 | <language name="Markdown" version="3" kateversion="3.8" section="Markup" extensions="*.md;*.mmd;*.markdown" priority="15" author="Darrin Yeager, Claes Holmerson" license="GPL,BSD"> | 38 | <language name="Markdown" version="4" kateversion="3.8" section="Markup" extensions="*.md;*.mmd;*.markdown" priority="15" author="Darrin Yeager, Claes Holmerson" license="GPL,BSD"> | ||
39 | <highlighting> | 39 | <highlighting> | ||
40 | <contexts> | 40 | <contexts> | ||
41 | <context attribute="Normal Text" lineEndContext="#stay" name="Normal Text"> | 41 | <context attribute="Normal Text" lineEndContext="#stay" name="Normal Text"> | ||
42 | <DetectChar context="blockquote" char=">" column="0"/> | 42 | <DetectChar context="blockquote" char=">" column="0"/> | ||
43 | <RegExpr attribute="h1" String="^#\s.*[#]?$"/> | 43 | <RegExpr attribute="h1" String="^#\s.*[#]?$"/> | ||
44 | <RegExpr attribute="h2" String="^##\s.*[#]?$"/> | 44 | <RegExpr attribute="h2" String="^##\s.*[#]?$"/> | ||
45 | <RegExpr attribute="h3" String="^###\s.*[#]?$"/> | 45 | <RegExpr attribute="h3" String="^###\s.*[#]?$"/> | ||
46 | <RegExpr attribute="h4" String="^####\s.*[#]?$"/> | 46 | <RegExpr attribute="h4" String="^####\s.*[#]?$"/> | ||
Show All 22 Lines | |||||
69 | <context attribute="numlist" lineEndContext="#stay" lineEmptyContext="#pop" name="numlist"> | 69 | <context attribute="numlist" lineEndContext="#stay" lineEmptyContext="#pop" name="numlist"> | ||
70 | <RegExpr attribute="nl-strong" String="&strongregex;"/> | 70 | <RegExpr attribute="nl-strong" String="&strongregex;"/> | ||
71 | <RegExpr attribute="nl-emphasis" String="&emphasisregex;"/> | 71 | <RegExpr attribute="nl-emphasis" String="&emphasisregex;"/> | ||
72 | <IncludeRules context="inc"/> | 72 | <IncludeRules context="inc"/> | ||
73 | </context> | 73 | </context> | ||
74 | <context attribute="comment" lineEndContext="#stay" name="comment"> | 74 | <context attribute="comment" lineEndContext="#stay" name="comment"> | ||
75 | <RegExpr String="-->" attribute="comment" context="#pop" endRegion="comment"/> | 75 | <RegExpr String="-->" attribute="comment" context="#pop" endRegion="comment"/> | ||
76 | </context> | 76 | </context> | ||
77 | <context attribute="code" lineEndContext="#stay" name="bash-code"> | ||||
78 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
79 | <IncludeRules context="##Bash"/> | ||||
80 | </context> | ||||
81 | <context attribute="code" lineEndContext="#stay" name="cmake-code"> | ||||
82 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
83 | <IncludeRules context="##CMake"/> | ||||
84 | </context> | ||||
85 | <context attribute="code" lineEndContext="#stay" name="cpp-code"> | ||||
86 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
87 | <IncludeRules context="##C++"/> | ||||
88 | </context> | ||||
89 | <context attribute="code" lineEndContext="#stay" name="css-code"> | ||||
90 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
91 | <IncludeRules context="##CSS"/> | ||||
92 | </context> | ||||
93 | <context attribute="code" lineEndContext="#stay" name="email-code"> | ||||
94 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
95 | <IncludeRules context="##Email"/> | ||||
96 | </context> | ||||
97 | <context attribute="code" lineEndContext="#stay" name="haskell-code"> | ||||
98 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
99 | <IncludeRules context="##Haskell"/> | ||||
100 | </context> | ||||
101 | <context attribute="code" lineEndContext="#stay" name="html-code"> | ||||
102 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
103 | <IncludeRules context="##HTML"/> | ||||
104 | </context> | ||||
105 | <context attribute="code" lineEndContext="#stay" name="json-code"> | ||||
106 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
107 | <IncludeRules context="##JSON"/> | ||||
108 | </context> | ||||
109 | <context attribute="code" lineEndContext="#stay" name="kconfig-code"> | ||||
110 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
111 | <IncludeRules context="##Kconfig"/> | ||||
112 | </context> | ||||
77 | <context attribute="code" lineEndContext="#stay" name="php-code"> | 113 | <context attribute="code" lineEndContext="#stay" name="php-code"> | ||
78 | <WordDetect attribute="code" context="#pop" String="```"/> | 114 | <WordDetect attribute="code" context="#pop" String="```"/> | ||
79 | <IncludeRules context="phpsource##PHP/PHP"/> | 115 | <IncludeRules context="phpsource##PHP/PHP"/> | ||
80 | </context> | 116 | </context> | ||
81 | <context attribute="code" lineEndContext="#stay" name="python-code"> | 117 | <context attribute="code" lineEndContext="#stay" name="python-code"> | ||
82 | <WordDetect attribute="code" context="#pop" String="```"/> | 118 | <WordDetect attribute="code" context="#pop" String="```"/> | ||
83 | <IncludeRules context="##Python"/> | 119 | <IncludeRules context="##Python"/> | ||
84 | </context> | 120 | </context> | ||
121 | <context attribute="code" lineEndContext="#stay" name="qml-code"> | ||||
122 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
123 | <IncludeRules context="##QML"/> | ||||
124 | </context> | ||||
125 | <context attribute="code" lineEndContext="#stay" name="rust-code"> | ||||
126 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
127 | <IncludeRules context="##Rust"/> | ||||
128 | </context> | ||||
129 | <context attribute="code" lineEndContext="#stay" name="xml-code"> | ||||
130 | <WordDetect attribute="code" context="#pop" String="```"/> | ||||
131 | <IncludeRules context="##XML"/> | ||||
132 | </context> | ||||
85 | <context attribute="code" lineEndContext="#stay" name="code"> | 133 | <context attribute="code" lineEndContext="#stay" name="code"> | ||
86 | <WordDetect attribute="code" context="#pop" String="```"/> | 134 | <WordDetect attribute="code" context="#pop" String="```"/> | ||
87 | </context> | 135 | </context> | ||
88 | <context attribute="common" name="inc" lineEndContext="#stay"> | 136 | <context attribute="common" name="inc" lineEndContext="#stay"> | ||
89 | <RegExpr attribute="code" String="`[^`]+`"/> | 137 | <RegExpr attribute="code" String="`[^`]+`"/> | ||
90 | <RegExpr context="comment" String="<!--" beginRegion="comment"/> | 138 | <RegExpr context="comment" String="<!--" beginRegion="comment"/> | ||
91 | <RegExpr attribute="reflink" String="&reflinkregex;"/> | 139 | <RegExpr attribute="reflink" String="&reflinkregex;"/> | ||
92 | <RegExpr attribute="footnote" String="&footnoteregex;"/> | 140 | <RegExpr attribute="footnote" String="&footnoteregex;"/> | ||
93 | <RegExpr attribute="inlinelink" String="&inlinelinkregex;"/> | 141 | <RegExpr attribute="inlinelink" String="&inlinelinkregex;"/> | ||
94 | <RegExpr attribute="reflinktarget" String="&reflinktargetregex;"/> | 142 | <RegExpr attribute="reflinktarget" String="&reflinktargetregex;"/> | ||
95 | <RegExpr attribute="inlineimage" String="&inlineimageregex;"/> | 143 | <RegExpr attribute="inlineimage" String="&inlineimageregex;"/> | ||
96 | <RegExpr attribute="refimage" String="&refimageregex;"/> | 144 | <RegExpr attribute="refimage" String="&refimageregex;"/> | ||
97 | <RegExpr attribute="autolink" String="&autolinkregex;"/> | 145 | <RegExpr attribute="autolink" String="&autolinkregex;"/> | ||
98 | <RegExpr attribute="mailtolink" String="&mailtolinkregex;"/> | 146 | <RegExpr attribute="mailtolink" String="&mailtolinkregex;"/> | ||
99 | <RegExpr attribute="strikeout" minimal="true" String="&strikeoutregex;"/> | 147 | <RegExpr attribute="strikeout" minimal="true" String="&strikeoutregex;"/> | ||
100 | <RegExpr attribute="linebreak" minimal="true" String="&linebreakregex;"/> | 148 | <RegExpr attribute="linebreak" minimal="true" String="&linebreakregex;"/> | ||
149 | <WordDetect attribute="code" context="bash-code" String="```bash"/> | ||||
150 | <WordDetect attribute="code" context="cmake-code" String="```cmake"/> | ||||
151 | <WordDetect attribute="code" context="cpp-code" String="```cpp"/> | ||||
152 | <WordDetect attribute="code" context="css-code" String="```css"/> | ||||
153 | <WordDetect attribute="code" context="email-code" String="```email"/> | ||||
154 | <WordDetect attribute="code" context="haskell-code" String="```haskell"/> | ||||
155 | <WordDetect attribute="code" context="html-code" String="```html"/> | ||||
156 | <WordDetect attribute="code" context="json-code" String="```json"/> | ||||
101 | <WordDetect attribute="code" context="php-code" String="```php"/> | 157 | <WordDetect attribute="code" context="php-code" String="```php"/> | ||
102 | <WordDetect attribute="code" context="python-code" String="```python"/> | 158 | <WordDetect attribute="code" context="python-code" String="```python"/> | ||
159 | <WordDetect attribute="code" context="qml-code" String="```qml"/> | ||||
160 | <WordDetect attribute="code" context="rust-code" String="```rust"/> | ||||
161 | <WordDetect attribute="code" context="xml-code" String="```xml"/> | ||||
103 | <StringDetect attribute="code" context="code" String="```"/> | 162 | <StringDetect attribute="code" context="code" String="```"/> | ||
104 | </context> | 163 | </context> | ||
105 | </contexts> | 164 | </contexts> | ||
106 | <itemDatas> | 165 | <itemDatas> | ||
107 | <itemData name="Normal Text" defStyleNum="dsNormal"/> | 166 | <itemData name="Normal Text" defStyleNum="dsNormal"/> | ||
108 | <itemData name="common" defStyleNum="dsNormal"/> | 167 | <itemData name="common" defStyleNum="dsNormal"/> | ||
109 | <itemData name="strongemphasis" defStyleNum="dsNormal" italic="true" bold="true"/> | 168 | <itemData name="strongemphasis" defStyleNum="dsNormal" italic="true" bold="true"/> | ||
110 | <itemData name="emphasis" defStyleNum="dsNormal" italic="true"/> | 169 | <itemData name="emphasis" defStyleNum="dsNormal" italic="true"/> | ||
Show All 38 Lines |