[gtksourceview] latex.lang: do not highlight curly braces for headings



commit dec7733acea199d6ca8c20a456ee2bfce088fef3
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu May 22 15:55:24 2014 +0200

    latex.lang: do not highlight curly braces for headings
    
    For all the other commands, the curly braces are not highlighted. So to
    be consistent, do the same for the headings.

 data/language-specs/latex.lang |   35 ++++++++++++++---------------------
 1 files changed, 14 insertions(+), 21 deletions(-)
---
diff --git a/data/language-specs/latex.lang b/data/language-specs/latex.lang
index 99bca31..88a8250 100644
--- a/data/language-specs/latex.lang
+++ b/data/language-specs/latex.lang
@@ -378,77 +378,70 @@
     <context id="headings">
       <include>
         <context id="part" style-inside="true" style-ref="part" end-at-line-end="true">
-          <start>\\part\{</start>
+          <start>(\\part)\{</start>
           <end>\}</end>
           <include>
-            <context sub-pattern="0" where="start" style-ref="common-commands"/>
-            <context sub-pattern="0" where="end" style-ref="common-commands"/>
+            <context sub-pattern="1" where="start" style-ref="common-commands"/>
             <context ref="curly-braces-pair"/>
             <context ref="latex"/>
           </include>
         </context>
 
         <context id="chapter" style-inside="true" style-ref="chapter" end-at-line-end="true">
-          <start>\\chapter\{</start>
+          <start>(\\chapter)\{</start>
           <end>\}</end>
           <include>
-            <context sub-pattern="0" where="start" style-ref="common-commands"/>
-            <context sub-pattern="0" where="end" style-ref="common-commands"/>
+            <context sub-pattern="1" where="start" style-ref="common-commands"/>
             <context ref="curly-braces-pair"/>
             <context ref="latex"/>
           </include>
         </context>
 
         <context id="section" style-inside="true" style-ref="section" end-at-line-end="true">
-          <start>\\section\{</start>
+          <start>(\\section)\{</start>
           <end>\}</end>
           <include>
-            <context sub-pattern="0" where="start" style-ref="common-commands"/>
-            <context sub-pattern="0" where="end" style-ref="common-commands"/>
+            <context sub-pattern="1" where="start" style-ref="common-commands"/>
             <context ref="curly-braces-pair"/>
             <context ref="latex"/>
           </include>
         </context>
 
         <context id="subsection" style-inside="true" style-ref="subsection" end-at-line-end="true">
-          <start>\\subsection\{</start>
+          <start>(\\subsection)\{</start>
           <end>\}</end>
           <include>
-            <context sub-pattern="0" where="start" style-ref="common-commands"/>
-            <context sub-pattern="0" where="end" style-ref="common-commands"/>
+            <context sub-pattern="1" where="start" style-ref="common-commands"/>
             <context ref="curly-braces-pair"/>
             <context ref="latex"/>
           </include>
         </context>
 
         <context id="subsubsection" style-inside="true" style-ref="subsubsection" end-at-line-end="true">
-          <start>\\subsubsection\{</start>
+          <start>(\\subsubsection)\{</start>
           <end>\}</end>
           <include>
-            <context sub-pattern="0" where="start" style-ref="common-commands"/>
-            <context sub-pattern="0" where="end" style-ref="common-commands"/>
+            <context sub-pattern="1" where="start" style-ref="common-commands"/>
             <context ref="curly-braces-pair"/>
             <context ref="latex"/>
           </include>
         </context>
 
         <context id="paragraph" style-inside="true" style-ref="paragraph" end-at-line-end="true">
-          <start>\\paragraph\{</start>
+          <start>(\\paragraph)\{</start>
           <end>\}</end>
           <include>
-            <context sub-pattern="0" where="start" style-ref="common-commands"/>
-            <context sub-pattern="0" where="end" style-ref="common-commands"/>
+            <context sub-pattern="1" where="start" style-ref="common-commands"/>
             <context ref="curly-braces-pair"/>
             <context ref="latex"/>
           </include>
         </context>
 
         <context id="subparagraph" style-inside="true" style-ref="subparagraph" end-at-line-end="true">
-          <start>\\subparagraph\{</start>
+          <start>(\\subparagraph)\{</start>
           <end>\}</end>
           <include>
-            <context sub-pattern="0" where="start" style-ref="common-commands"/>
-            <context sub-pattern="0" where="end" style-ref="common-commands"/>
+            <context sub-pattern="1" where="start" style-ref="common-commands"/>
             <context ref="curly-braces-pair"/>
             <context ref="latex"/>
           </include>


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