[gtksourceview] rst.lang: Handle line blocks



commit 47bf4d5d3d0aa61b85ad4694122bd314dde2d9ee
Author: Pierre Ossman <ossman cendio se>
Date:   Fri Oct 15 17:11:53 2021 +0200

    rst.lang: Handle line blocks

 data/language-specs/rst.lang | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/data/language-specs/rst.lang b/data/language-specs/rst.lang
index 2351d310..2c16ca26 100644
--- a/data/language-specs/rst.lang
+++ b/data/language-specs/rst.lang
@@ -31,6 +31,7 @@
     <style id="emphasis" name="Emphasis" map-to="def:emphasis"/>
     <style id="strong-emphasis" name="Strong Emphasis" map-to="def:strong-emphasis"/>
     <style id="bullet" name="Bullet" map-to="def:list-marker"/>
+    <style id="lineblock" name="Line block" map-to="def:string"/>
     <style id="directive" name="Directive" map-to="def:constant"/>
     <style id="comment" name="Comment" map-to="def:comment"/>
     <style id="interpreted" name="Interpreted" map-to="def:identifier"/>
@@ -109,6 +110,11 @@
       <match>^\s*((\%{enumerator-chars}\.)|(\(?\%{enumerator-chars}\)) )</match>
     </context>
 
+    <context id="lineblock" style-ref="lineblock">
+      <start>^(\s*)\| \S</start>
+      <end>^(?!(\%{1@start}(  |\|))|(\s*$))</end>
+    </context>
+
     <context id="field" style-ref="bullet">
       <match>:(?![: ])([^:\\]|\\.|:(?!([ `]|$)))*(?&lt;! ):( +|$)</match>
     </context>
@@ -180,6 +186,7 @@
         <context ref="title-adornment"/>
         <context ref="bullet"/>
         <context ref="enumerator"/>
+        <context ref="lineblock"/>
         <context ref="field"/>
         <context ref="strong-emphasis"/>
         <context ref="emphasis"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]