[gtksourceview] latex.lang: better support of no-spell-check in specific-commands



commit b0165a47845ece29786b3c4e3c92236eb241a086
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Jul 29 13:03:43 2016 +0200

    latex.lang: better support of no-spell-check in specific-commands
    
    Benefit from the no-spell-check class even if the command is not yet
    completely written, for example:
    
    \documentclass[a4paper,11pt]

 data/language-specs/latex.lang |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/data/language-specs/latex.lang b/data/language-specs/latex.lang
index 96ef5ed..f58e981 100644
--- a/data/language-specs/latex.lang
+++ b/data/language-specs/latex.lang
@@ -291,14 +291,14 @@
     <context id="specific-commands">
       <include>
         <context id="documentclass" class="no-spell-check">
-          <match>(\\documentclass)(\[.*\])?\{[a-zA-Z]+\}</match>
+          <match>(\\documentclass)(\[.*\])?(\{[a-zA-Z]+\})?</match>
           <include>
             <context sub-pattern="1" style-ref="common-commands"/>
           </include>
         </context>
 
         <context id="usepackage" class="no-spell-check">
-          <match>(\\usepackage)(\[.*\])?\{[0-9a-zA-Z,\s]+\}</match>
+          <match>(\\usepackage)(\[.*\])?(\{[0-9a-zA-Z,\s]+\})?</match>
           <include>
             <context sub-pattern="1" style-ref="include"/>
           </include>


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