[gtksourceview] css.lang: pseudo-elements with two colons



commit 1457ff879786b83247d4701dc461f0d10e74b323
Author: Jeffery To <jeffery to gmail com>
Date:   Wed Apr 25 19:53:33 2018 +0800

    css.lang: pseudo-elements with two colons
    
    Make existing pseudo-elements work with two colons, add ::placeholder
    and ::selection pseudo-elements
    
    This changes the existing pseudo-elements (:first-line, :first-letter,
    :before, :after) to highlight both one-colon and two-colon forms, and
    adds support for ::placeholder and ::selection (with future
    pseudo-elements also using the two-colon form).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795540

 data/language-specs/css.lang |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/data/language-specs/css.lang b/data/language-specs/css.lang
index f191d34..9525121 100644
--- a/data/language-specs/css.lang
+++ b/data/language-specs/css.lang
@@ -66,14 +66,20 @@
       <match>\\([a-fA-F0-9]{1,5}[ \t]|[a-fA-F0-9]{6})</match>
     </context>
 
-    <context id="selector-pseudo-elements" style-ref="function">
-      <prefix>:</prefix>
+    <context id="selector-pseudo-elements-one-colon" style-ref="function">
+      <prefix>::?</prefix>
       <keyword>first-line</keyword>
       <keyword>first-letter</keyword>
       <keyword>before</keyword>
       <keyword>after</keyword>
     </context>
 
+    <context id="selector-pseudo-elements" style-ref="function">
+      <prefix>::</prefix>
+      <keyword>placeholder</keyword>
+      <keyword>selection</keyword>
+    </context>
+
     <context id="selector-pseudo-classes" style-ref="function">
       <prefix>:</prefix>
       <keyword>enabled</keyword>
@@ -990,6 +996,7 @@
         <context ref="def:c-like-comment-multiline"/>
         <context ref="def:c-like-close-comment-outside-comment"/>
         <context ref="unicode-character-reference"/>
+        <context ref="selector-pseudo-elements-one-colon"/>
         <context ref="selector-pseudo-elements"/>
         <context ref="selector-pseudo-classes"/>
         <context ref="css3-at-rules"/>


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