[gtksourceview] Highlight css inside the <style> tag.



commit c03d132191f44e6143b7960b3eb42f2896c933e2
Author: Paolo Borelli <pborelli gnome org>
Date:   Mon Apr 25 21:17:21 2011 +0200

    Highlight css inside the <style> tag.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=638804

 data/language-specs/html.lang |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/html.lang b/data/language-specs/html.lang
index 539f660..8583a98 100644
--- a/data/language-specs/html.lang
+++ b/data/language-specs/html.lang
@@ -116,6 +116,24 @@
             </include>
         </context>
 
+        <context id="style" class="no-spell-check">
+            <start>&lt;\s*style\%]</start>
+            <end>/&gt;|&lt;\s*/\s*style\s*&gt;</end>
+
+            <include>
+                <context sub-pattern="0" where="start" style-ref="tag"/>
+                <context sub-pattern="0" where="end" style-ref="tag"/>
+                <context ref="generic-tag"/>
+                <context id="style-code" extend-parent="false">
+                    <start>&gt;</start>
+                    <include>
+                        <context sub-pattern="0" where="start" style-ref="tag"/>
+                        <context ref="css:css"/>
+                    </include>
+                </context>
+            </include>
+        </context>
+
         <context id="script" class="no-spell-check">
             <start>&lt;\s*script\%]</start>
             <end>/&gt;|&lt;\s*/\s*script\s*&gt;</end>
@@ -152,6 +170,7 @@
                 <context ref="xml:cdata"/>
                 <context ref="comment"/>
                 <context ref="dtd"/>
+                <context ref="style"/>
                 <context ref="script"/>
                 <context ref="tag"/>
             </include>



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