[gtksourceview/wip/latex: 2/2] latex.lang: include the generic-command in math mode



commit 64ac7b975ef91ba4e64f6339e1498853c1ce8791
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Dec 5 21:14:31 2013 +0100

    latex.lang: include the generic-command in math mode
    
    But the 'end' of a math context has a higher priority than the generic
    command. For example for
    
    \begin{math}
    \alpha
    \end{math}
    
    The \end{math} is not taken by the generic-command, because it ends the
    math environment.

 data/language-specs/latex.lang |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/data/language-specs/latex.lang b/data/language-specs/latex.lang
index 7450ac2..3b8111a 100644
--- a/data/language-specs/latex.lang
+++ b/data/language-specs/latex.lang
@@ -268,7 +268,7 @@
       <keyword>usepackage</keyword>
     </context>
 
-    <context id="generic-command" style-ref="command" class="no-spell-check">
+    <context id="generic-command" style-ref="command" class="no-spell-check" extend-parent="false">
       <match>\\[a-zA-Z]+\*?</match>
     </context>
 
@@ -385,6 +385,7 @@
     <context id="in-math" class="no-spell-check">
       <include>
         <context ref="math-command"/>
+        <context ref="generic-command"/>
         <!-- more to come -->
       </include>
     </context>


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