[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kate] part/syntax/data: support comments in reST
From: Matthew Woehlke <matthew.woehlke () kitware ! com>
Date: 2014-03-03 21:46:30
Message-ID: E1WKagw-0005vO-Pg () scm ! kde ! org
[Download RAW message or body]
Git commit c5b57b219567fd64eebf67371ccc325fead18583 by Matthew Woehlke.
Committed on 11/02/2014 at 20:18.
Pushed by mwoehlke into branch 'master'.
support comments in reST
Add <comments> tag to rest.xml so that the comment/uncomment shortcuts
may be used. Add rule to detect comments.
M +8 -0 part/syntax/data/rest.xml
http://commits.kde.org/kate/c5b57b219567fd64eebf67371ccc325fead18583
diff --git a/part/syntax/data/rest.xml b/part/syntax/data/rest.xml
index 36d845c..30a054c 100644
--- a/part/syntax/data/rest.xml
+++ b/part/syntax/data/rest.xml
@@ -29,6 +29,7 @@
<RegExpr attribute="Code" String="::$" context="CodeBlock" />
<RegExpr attribute="SubstitutionDefinition" context="#stay" String="\.\. \
\|[&SimpleReferenceNameChars; ]+\|\s+[&SimpleReferenceNameChars;]+::\s" \
minimal="true" firstNonSpace="true"/>
<RegExpr attribute="Field" String=":(?=([^:]*\\:)*[^:]*:(\s|$))" \
context="Field" firstNonSpace="true"/> + <RegExpr attribute="Comment" \
context="Comment" String="\.\.\s" firstNonSpace="true"/> </context>
<context name="InlineMarkup" attribute="Normal" lineEndContext="#stay">
@@ -58,6 +59,9 @@
<context name="TrailingRole" attribute="Role" lineEndContext="#pop">
<RegExpr attribute="Role" String=":[\w-_\.\+]+:" context="#pop"/>
</context>
+ <context name="Comment" attribute="Comment" lineEndContext="#pop">
+ <IncludeRules context="##Alerts"/>
+ </context>
<context name="CMakeCodeBlock" attribute="CMakeCode" lineEndContext="#stay">
<RegExpr attribute="CMakeCode" String="^(\s+)(?=\S)" \
context="CMakeCodeRegion" /> @@ -116,12 +120,16 @@
<itemData name="CMakeCode" defStyleNum="dsDataType" />
<itemData name="CppCode" defStyleNum="dsDataType" />
<itemData name="Code" defStyleNum="dsDataType" />
+ <itemData name="Comment" defStyleNum="dsComment" />
</itemDatas>
</highlighting>
<general>
<folding indentationsensitive="true" />
+ <comments>
+ <comment name="singleLine" start=".."/>
+ </comments>
</general>
</language>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic