[gtksourceview] rst.lang: Be more strict for directives
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] rst.lang: Be more strict for directives
- Date: Tue, 19 Oct 2021 22:30:14 +0000 (UTC)
commit 3d0ae179d2d816e12bbbfe5961bfef21851c9938
Author: Pierre Ossman <ossman cendio se>
Date: Fri Oct 15 17:02:36 2021 +0200
rst.lang: Be more strict for directives
They generally don't match whitespace characters.
data/language-specs/rst.lang | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/data/language-specs/rst.lang b/data/language-specs/rst.lang
index 6a57449a..6aeeb4a0 100644
--- a/data/language-specs/rst.lang
+++ b/data/language-specs/rst.lang
@@ -43,11 +43,15 @@
<definitions>
<context id="directive" class="no-spell-check" style-ref="directive">
- <match>^\s*\.\. .*::.*$</match>
+ <match>^\s*\.\. \w*::.*$</match>
</context>
<context id="footnotes" style-ref="directive">
- <match>^\s*\.\. \[.+\] .*$</match>
+ <match>^\s*\.\. \[([0-9]+|\#|\#\w+|\*)\] </match>
+ </context>
+
+ <context id="citation" style-ref="directive">
+ <match>^\s*\.\. \[\w+\] </match>
</context>
<context id="link-target" class="no-spell-check" style-ref="directive">
@@ -163,6 +167,7 @@
<context ref="directive"/>
<context ref="link-target"/>
<context ref="footnotes"/>
+ <context ref="citation"/>
<context ref="comment"/>
<context ref="comment-single"/>
<context ref="title-adornment"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]