[gtksourceview] html.lang: Enhance <title> highlighting



commit 048ba1dde88e734151c10971343a14a96701aef3
Author: Jeffery To <jeffery to gmail com>
Date:   Mon Oct 15 03:53:56 2018 +0800

    html.lang: Enhance <title> highlighting
    
    * Allow title to span multiple lines
    * Allow title tag to contain attributes (lang is probably the only
    useful attribute here), spaces after tag name

 data/language-specs/html.lang | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/data/language-specs/html.lang b/data/language-specs/html.lang
index ceda5d74..30145c2a 100644
--- a/data/language-specs/html.lang
+++ b/data/language-specs/html.lang
@@ -90,13 +90,21 @@
 
     <context id="headings">
       <include>
-        <context id="title" style-inside="true" style-ref="title" end-at-line-end="true">
-          <start>&lt;title&gt;</start>
-          <end>&lt;/title&gt;</end>
+        <context id="title" class="no-spell-check">
+          <start>&lt;title\%]</start>
           <include>
             <context sub-pattern="0" where="start" style-ref="tag"/>
-            <context sub-pattern="0" where="end" style-ref="tag"/>
-            <context ref="embedded-lang-hook"/>
+            <context ref="generic-tag"/>
+
+            <context style-inside="true" style-ref="title" end-parent="true" class-disabled="no-spell-check">
+              <start>&gt;</start>
+              <end>&lt;/title\s*&gt;</end>
+              <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>
           </include>
         </context>
 


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