[gtksourceview/wip/latex] latex.lang: group verbatim contexts



commit 33d59ef2adf9f5c3ee0bb1cc50a09cc1c75c624b
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Nov 28 15:25:26 2013 +0100

    latex.lang: group verbatim contexts

 data/language-specs/latex.lang |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/data/language-specs/latex.lang b/data/language-specs/latex.lang
index 7e18dd5..b6e34fa 100644
--- a/data/language-specs/latex.lang
+++ b/data/language-specs/latex.lang
@@ -316,6 +316,7 @@
         <context sub-pattern="1" where="start" style-ref="command" class="no-spell-check"/>
       </include>
     </context>
+
     <context id="lstinline-square-brackets" style-inside="true" style-ref="verbatim" 
class-disabled="no-spell-check">
       <!-- square brackets don't match with the pair, and they require an
            optional argument, even if empty -->
@@ -325,6 +326,7 @@
         <context sub-pattern="1" where="start" style-ref="command" class="no-spell-check"/>
       </include>
     </context>
+
     <context id="lstinline" style-inside="true" style-ref="verbatim" class-disabled="no-spell-check">
       <start>(\\lstinline)(\[.*?\])?((?!\[)\S)</start>  <!-- ignore when starting with [ -->
       <end>\%{3 start}</end>
@@ -332,6 +334,7 @@
         <context sub-pattern="1" where="start" style-ref="command" class="no-spell-check"/>
       </include>
     </context>
+
     <!-- If using \verb instead of \lstinline, the brackets cannot be used -->
     <context id="verbatim-inline" style-inside="true" style-ref="verbatim" class-disabled="no-spell-check">
       <start>(\\verb)\*?(\S)</start>
@@ -341,6 +344,16 @@
       </include>
     </context>
 
+    <context id="verbatim">
+      <include>
+        <context ref="verbatim-env"/>
+        <context ref="verbatim-inline"/>
+        <context ref="lstinline-curly-brackets"/>
+        <context ref="lstinline-square-brackets"/>
+        <context ref="lstinline"/>
+      </include>
+    </context>
+
     <context id="usepackage">
       <match>(\\usepackage)(\[.*\])?\{([0-9a-zA-Z,\s]+)\}</match>
         <include>
@@ -365,11 +378,7 @@
         <context ref="math-2"/>
         <context ref="inline-math-1"/>
         <context ref="inline-math-2"/>
-        <context ref="verbatim-env"/>
-        <context ref="lstinline-curly-brackets"/>
-        <context ref="lstinline-square-brackets"/>
-        <context ref="lstinline"/>
-        <context ref="verbatim-inline"/>
+        <context ref="verbatim"/>
         <context ref="usepackage"/>
         <context ref="include"/>
         <context ref="common-commands"/>


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