[gtksourceview] rst.lang: Handle multi line inline markup



commit c3544a10f1a7b4de648eb1d8a5b44eb322b23241
Author: Pierre Ossman <ossman cendio se>
Date:   Fri Oct 15 11:10:09 2021 +0200

    rst.lang: Handle multi line inline markup

 data/language-specs/rst.lang | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/data/language-specs/rst.lang b/data/language-specs/rst.lang
index 16895b38..689d081c 100644
--- a/data/language-specs/rst.lang
+++ b/data/language-specs/rst.lang
@@ -102,11 +102,13 @@
     </context>
 
     <context id="strong-emphasis" style-ref="strong-emphasis">
-      <match>\*\*(?!\s).+?(?!\s)\*\*</match>
+      <start>\*\*(?!(\s|$))</start>
+      <end>(?&lt;!\s)\*\*</end>
     </context>
 
     <context id="emphasis" style-ref="emphasis">
-      <match>\*(?!\s).+?(?!\s)\*</match>
+      <start>\*(?!(\s|$))</start>
+      <end>(?&lt;!\s)\*</end>
     </context>
 
     <context id="link" style-ref="link">
@@ -114,13 +116,15 @@
     </context>
 
     <context id="substitution" style-ref="substitution">
-      <match>\|\b.*\b\|</match>
+      <start>\|(?!(\s|$))</start>
+      <end>(?&lt;!\s)\|</end>
     </context>
 
     <context id="literals">
       <include>
         <context id="inline-literals" class="no-spell-check" style-ref="code">
-          <match>``(?!\s).*(?!\s)``</match>
+          <start>``(?!(\s|$))</start>
+          <end>(?&lt;!\s)``</end>
         </context>
       </include>
     </context>


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