[gtksourceview] css.lang: Remove prefix/suffix for colors and property values



commit 366fb3a408e5f0240b82b3919537962a8a28b481
Author: Jeffery To <jeffery to gmail com>
Date:   Wed May 9 02:50:22 2018 +0800

    css.lang: Remove prefix/suffix for colors and property values
    
    A space before or after a color or property value is not required, and
    normal keyword matching will ensure there are word boundaries before and
    after the keyword, so the prefix and suffix are not necessary.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795947

 data/language-specs/css.lang       |   10 ----------
 tests/syntax-highlighting/file.css |    3 ++-
 2 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/data/language-specs/css.lang b/data/language-specs/css.lang
index 8c98871..9361401 100644
--- a/data/language-specs/css.lang
+++ b/data/language-specs/css.lang
@@ -148,8 +148,6 @@
     </context>
 
     <context id="css3-named-color" style-ref="color">
-      <prefix>\s</prefix>
-      <suffix>($|(?=[;\s]))</suffix>
       <keyword>aliceblue</keyword>
       <keyword>antiquewhite</keyword>
       <keyword>aquamarine</keyword>
@@ -284,8 +282,6 @@
     </context>
 
     <context id="named-color" style-ref="color">
-      <prefix>\s</prefix>
-      <suffix>($|(?=[;\s]))</suffix>
       <keyword>aqua</keyword>
       <keyword>black</keyword>
       <keyword>blue</keyword>
@@ -673,8 +669,6 @@
     </context>
 
     <context id="svg-property-values" style-ref="property-values">
-      <prefix>\s</prefix>
-      <suffix>($|(?=[;\s]))</suffix>
       <keyword>alphabetic</keyword>
       <keyword>bevel</keyword>
       <keyword>butt</keyword>
@@ -708,8 +702,6 @@
     </context>
 
     <context id="css3-property-values" style-ref="property-values">
-      <prefix>\s</prefix>
-      <suffix>($|(?=[;\s]))</suffix>
       <keyword>active</keyword>
       <keyword>add</keyword>
       <keyword>allow-end</keyword>
@@ -868,8 +860,6 @@
     </context>
 
     <context id="property-values" style-ref="property-values">
-      <prefix>\s</prefix>
-      <suffix>($|(?=[;\s]))</suffix>
       <keyword>above</keyword>
       <keyword>absolute</keyword>
       <keyword>alias</keyword>
diff --git a/tests/syntax-highlighting/file.css b/tests/syntax-highlighting/file.css
index 5c3a280..edd802f 100644
--- a/tests/syntax-highlighting/file.css
+++ b/tests/syntax-highlighting/file.css
@@ -3,7 +3,8 @@
 }
 
 p + div {
-    color: aqua;
+    color:aqua;
+    float: left!important;
 }
 
 .someclass,


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