diff options
Diffstat (limited to 'kate/data/rest.xml')
-rw-r--r-- | kate/data/rest.xml | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/kate/data/rest.xml b/kate/data/rest.xml index 13639650c..6ca3a1a44 100644 --- a/kate/data/rest.xml +++ b/kate/data/rest.xml @@ -11,7 +11,7 @@ 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="2" kateversion="2.4" casesensitive="1"> +<language name="reStructuredText" extensions="*.rst" section="Markup" mimetype="text/x-rst" version="4" kateversion="2.4" casesensitive="1"> <highlighting> @@ -23,12 +23,12 @@ <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"/> - <RegExpr attribute="Code" String="^\s*\.\. code-block::" context="CodeBlock" column="0"/> - <RegExpr attribute="Directive" context="#stay" String="^\s*\.\. [\w-_\.]+::(\s|$)" minimal="true" column="0"/> + <StringDetect attribute="Code" String=".. code-block::" context="CodeBlock" firstNonSpace="true"/> + <RegExpr attribute="Directive" context="#stay" String="^\s*\.\. [\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-_\.]+::(\s|$))" column="0"/> + <RegExpr attribute="Comment" context="Comment" String="^(\s*)\.\.\s(?![\w\-_\.]+::(\s|$))" column="0"/> </context> <context name="InlineMarkup" attribute="Normal" lineEndContext="#stay"> @@ -36,10 +36,9 @@ <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].*`_&inlineend;" minimal="true"/> - <RegExpr attribute="HyperlinkReference" context="#stay" String="&inlinestart;\w+_&inlineend;" minimal="true"/> - <RegExpr attribute="InterpretedText" context="TrailingRole" String="&inlinestart;`[^\s].*`(?=:[\w-_\.\+]+:)" minimal="true"/> - <RegExpr attribute="Role" String=":[\w-_\.\+]+:(?=`)" context="Role"/> + <RegExpr attribute="HyperlinkReference" context="#stay" String="&inlinestart;(`[^\s].*`|\w+)_&inlineend;" minimal="true"/> + <RegExpr attribute="InterpretedText" context="TrailingRole" String="&inlinestart;`[^\s].*`(?=:[\w\-_\.\+]+:)" minimal="true"/> + <RegExpr attribute="Role" String=":[\w\-_\.\+]+:(?=`)" context="Role"/> </context> <context name="Field" attribute="Field" lineEndContext="#stay"> @@ -56,7 +55,7 @@ <DetectChar attribute="InterpretedText" char="`" context="#pop!InterpretedText" /> </context> <context name="TrailingRole" attribute="Role" lineEndContext="#pop"> - <RegExpr attribute="Role" String=":[\w-_\.\+]+:" context="#pop"/> + <RegExpr attribute="Role" String=":[\w\-_\.\+]+:" context="#pop"/> </context> <context name="Comment" attribute="Comment" lineEndContext="#stay" dynamic="true"> <RegExpr attribute="Code" String="^%1 " context="#stay" column="0" dynamic="true"/> |