[gtksourceview/gnome-3-24] bibtex.lang: add string context for bib(la)tex values



commit bcd8d51d8998d8309f90a0890b228b576e3f7ef5
Author: Schrieveslaach <info schrieveslaach de>
Date:   Tue Jun 13 15:58:26 2017 +0200

    bibtex.lang: add string context for bib(la)tex values
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762990

 data/language-specs/bibtex.lang |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/bibtex.lang b/data/language-specs/bibtex.lang
index 47a0509..d58ac2b 100644
--- a/data/language-specs/bibtex.lang
+++ b/data/language-specs/bibtex.lang
@@ -31,6 +31,7 @@
   <styles>
     <style id="entry-type" _name="Entries" map-to="def:keyword"/>
     <style id="field"      _name="Field"   map-to="def:identifier"/>
+    <style id="string"     _name="String"  map-to="def:string"/>
   </styles>
 
   <default-regex-options case-sensitive="false"/>
@@ -97,11 +98,23 @@
       <keyword>year</keyword>
     </context>
 
+    <context id="string" class-disabled="no-spell-check">
+      <match extended="true">
+        =\s*(\{.*?\})|(".*?")
+      </match>
+
+      <include>
+        <context sub-pattern="1" style-ref="string" class="string"/>
+        <context sub-pattern="2" style-ref="string" class="string"/>
+      </include>
+    </context>
+
     <context id="bibtex">
       <include>
         <context ref="latex:latex"/>
         <context ref="entry-type"/>
         <context ref="field"/>
+        <context ref="string"/>
       </include>
     </context>
   </definitions>


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