[gtksourceview] html: adding embedded-lang-hook context to headings-contexts



commit 932f9cbdd029dd34aa74d943e3dd9a32129518ff
Author: Tobias Schönberg <tobias47n9e gmail com>
Date:   Sat Sep 12 22:34:01 2015 +0200

    html: adding embedded-lang-hook context to headings-contexts
    
    Languages embedded im html, whos highlighting is inherited from html.lang
    are not hightlighted between the headings-contexts (<title>, <h1>, ...).
    This prevents the reader to properly recognize code that is used to
    customize the title or headings. For example the Django Template Language
    is often used between the <title> tags to customize the title. If the
    '{{' and '}}' brackets are not highlighted the reader interprets the
    section as text instead of the embedded language. The patch adds the
    <context ref="embedded-lang-hook"/> to the headings-contexts to fix this.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754934

 data/language-specs/html.lang |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/html.lang b/data/language-specs/html.lang
index 58bf062..74ab6eb 100644
--- a/data/language-specs/html.lang
+++ b/data/language-specs/html.lang
@@ -79,6 +79,7 @@
           <include>
             <context sub-pattern="0" where="start" style-ref="tag"/>
             <context sub-pattern="0" where="end" style-ref="tag"/>
+            <context ref="embedded-lang-hook"/>
           </include>
         </context>
         <context id="h1" end-at-line-end="true">
@@ -92,6 +93,7 @@
               <include>
                 <context sub-pattern="0" where="start" style-ref="tag"/>
                 <context sub-pattern="0" where="end" style-ref="tag"/>
+                <context ref="embedded-lang-hook"/>
                 <!-- We cannot match any further here, because matching to tag will override our end-match 
-->
               </include>
             </context>
@@ -108,6 +110,7 @@
               <include>
                 <context sub-pattern="0" where="start" style-ref="tag"/>
                 <context sub-pattern="0" where="end" style-ref="tag"/>
+                <context ref="embedded-lang-hook"/>
                 <!-- We cannot match any further here, because matching to tag will override our end-match 
-->
               </include>
             </context>
@@ -124,6 +127,7 @@
               <include>
                 <context sub-pattern="0" where="start" style-ref="tag"/>
                 <context sub-pattern="0" where="end" style-ref="tag"/>
+                <context ref="embedded-lang-hook"/>
                 <!-- We cannot match any further here, because matching to tag will override our end-match 
-->
               </include>
             </context>
@@ -140,6 +144,7 @@
               <include>
                 <context sub-pattern="0" where="start" style-ref="tag"/>
                 <context sub-pattern="0" where="end" style-ref="tag"/>
+                <context ref="embedded-lang-hook"/>
                 <!-- We cannot match any further here, because matching to tag will override our end-match 
-->
               </include>
             </context>
@@ -156,6 +161,7 @@
               <include>
                 <context sub-pattern="0" where="start" style-ref="tag"/>
                 <context sub-pattern="0" where="end" style-ref="tag"/>
+                <context ref="embedded-lang-hook"/>
                 <!-- We cannot match any further here, because matching to tag will override our end-match 
-->
               </include>
             </context>


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