[gtksourceview] html.lang: fix regression in quoted attribute context



commit f8fec15129acffd748b6df748383cd0b5b1bede4
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Feb 8 21:30:50 2014 +0100

    html.lang: fix regression in quoted attribute context
    
    The \" (string beginning) must be at the first <start>, otherwise it can
    match text like:
    
    <a href=blah"foobar">link</a>
    
    And the 'end' sub-pattern is no longer needed.

 data/language-specs/html.lang |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/data/language-specs/html.lang b/data/language-specs/html.lang
index b193005..49fc201 100644
--- a/data/language-specs/html.lang
+++ b/data/language-specs/html.lang
@@ -171,12 +171,12 @@
           <start extended="true">
             [A-Za-z0-9:_-]+ # attribute name
             \s*=\s*         # "="
+            (\")            # string beginning
           </start>
           <include>
             <context sub-pattern="1" where="start" style-ref="attrib-value"/>
-            <context sub-pattern="0" where="end" style-ref="attrib-value"/>
             <context id="string" end-parent="true" end-at-line-end="true" style-ref="attrib-value" 
class="string" class-disabled="no-spell-check">
-              <start>\"</start>
+              <start>\%{def:always-match}</start>
               <end>\"</end>
               <include>
                 <context ref="xml:entity"/>


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