[gtksourceview/gnome-3-24] css.lang, less.lang, scss.lang: Remove unnecessary character escapes



commit 453e298e27e38dba62213f361ce2a68e647fb664
Author: Jeffery To <jeffery to gmail com>
Date:   Wed Jul 4 05:10:32 2018 +0800

    css.lang, less.lang, scss.lang: Remove unnecessary character escapes
    
    This also replaces greater-than signs (>) with &gt;, to be consistent.

 data/language-specs/css.lang  | 36 ++++++++++++++++++------------------
 data/language-specs/less.lang | 26 +++++++++++++-------------
 data/language-specs/scss.lang | 22 +++++++++++-----------
 3 files changed, 42 insertions(+), 42 deletions(-)
---
diff --git a/data/language-specs/css.lang b/data/language-specs/css.lang
index cad6ca95..3de28b38 100644
--- a/data/language-specs/css.lang
+++ b/data/language-specs/css.lang
@@ -413,7 +413,7 @@
     </context>
 
     <define-regex id="number-magnitude-regex" extended="true">
-      (?: (?> \d* \. \d+ | \d+ ) (?: e [+-]? \d+ )? )
+      (?: (?&gt; \d* \. \d+ | \d+ ) (?: e [+-]? \d+ )? )
     </define-regex>
 
     <define-regex id="number-regex" extended="true">
@@ -425,7 +425,7 @@
     </define-regex>
 
     <define-regex id="integer-magnitude-regex" extended="true">
-      (?> \d+ )
+      (?&gt; \d+ )
     </define-regex>
 
     <define-regex id="integer-regex" extended="true">
@@ -511,7 +511,7 @@
 
     <context id="unicode-range" style-ref="unicode-range">
       <match extended="true">
-        \%[ u \+ (?> [a-f0-9?]{1,6} ) (?> - [a-f0-9]{1,6} )?
+        \%[ u \+ (?&gt; [a-f0-9?]{1,6} ) (?&gt; - [a-f0-9]{1,6} )?
         (?! \%{single-identifier-char-regex} )
       </match>
     </context>
@@ -1560,8 +1560,8 @@
     </context>
 
     <context id="style-block">
-      <start>\{</start>
-      <end>\}</end>
+      <start>{</start>
+      <end>}</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="block-delimiter"/>
         <context sub-pattern="0" where="end" style-ref="block-delimiter"/>
@@ -1712,8 +1712,8 @@
     </context>
 
     <context id="at-rule-style-block" end-parent="true">
-      <start>\{</start>
-      <end>\}</end>
+      <start>{</start>
+      <end>}</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="block-delimiter"/>
         <context sub-pattern="0" where="end" style-ref="block-delimiter"/>
@@ -1731,8 +1731,8 @@
     </context>
 
     <context id="at-rule-css-block" end-parent="true">
-      <start>\{</start>
-      <end>\}</end>
+      <start>{</start>
+      <end>}</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="block-delimiter"/>
         <context sub-pattern="0" where="end" style-ref="block-delimiter"/>
@@ -1845,8 +1845,8 @@
     </context>
 
     <context id="at-font-feature-values-feature-value-block">
-      <start>\{</start>
-      <end>\}</end>
+      <start>{</start>
+      <end>}</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="block-delimiter"/>
         <context sub-pattern="0" where="end" style-ref="block-delimiter"/>
@@ -1858,8 +1858,8 @@
     </context>
 
     <context id="at-font-feature-values-block" end-parent="true">
-      <start>\{</start>
-      <end>\}</end>
+      <start>{</start>
+      <end>}</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="block-delimiter"/>
         <context sub-pattern="0" where="end" style-ref="block-delimiter"/>
@@ -1915,8 +1915,8 @@
     </context>
 
     <context id="at-keyframes-block" end-parent="true">
-      <start>\{</start>
-      <end>\}</end>
+      <start>{</start>
+      <end>}</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="block-delimiter"/>
         <context sub-pattern="0" where="end" style-ref="block-delimiter"/>
@@ -2020,8 +2020,8 @@
     </context>
 
     <context id="at-page-block" end-parent="true">
-      <start>\{</start>
-      <end>\}</end>
+      <start>{</start>
+      <end>}</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="block-delimiter"/>
         <context sub-pattern="0" where="end" style-ref="block-delimiter"/>
@@ -2178,7 +2178,7 @@
 
     <context id="attribute-selector">
       <start>\[</start>
-      <end>\]</end>
+      <end>]</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="attribute-selector"/>
         <context sub-pattern="0" where="end" style-ref="attribute-selector"/>
diff --git a/data/language-specs/less.lang b/data/language-specs/less.lang
index f8a4cd2b..74ae3127 100644
--- a/data/language-specs/less.lang
+++ b/data/language-specs/less.lang
@@ -62,7 +62,7 @@
     <!-- global -->
 
     <define-regex id="statement-end" extended="true">
-      (?: ; | (?= \} ) )
+      (?: ; | (?= } ) )
     </define-regex>
 
     <context id="less-comment">
@@ -86,8 +86,8 @@
     </context>
 
     <context id="variable-interpolation" style-ref="variable">
-      <start>@\{</start>
-      <end>\}</end>
+      <start>@{</start>
+      <end>}</end>
       <include>
         <!-- nested interpolations are not documented but appear to work
              (functions as variable reference / indirection) -->
@@ -108,7 +108,7 @@
     </context>
 
     <context id="arguments-variable-interpolation" style-ref="built-in-variable">
-      <match>@\{arguments\}</match>
+      <match>@{arguments}</match>
     </context>
 
     <context id="variable-value">
@@ -176,8 +176,8 @@
     </context>
 
     <context id="detached-ruleset">
-      <start>\{</start>
-      <end>\}</end>
+      <start>{</start>
+      <end>}</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="css:block-delimiter"/>
         <context sub-pattern="0" where="end" style-ref="css:block-delimiter"/>
@@ -371,17 +371,17 @@
       <start extended="true">
         (?(DEFINE)
           (?&lt;interpolation&gt;  # recursive subpattern to find matching brackets
-            @\{
+            @{
               (?:
-                (?>
+                (?&gt;
                   (?:
                     [^@{}]+ |
-                    (?! @\{ | \} ) .
+                    (?! @{ | } ) .
                   )+
                 ) |
                 (?&amp;interpolation)
               )*
-            \}
+            }
           )
         )
         (
@@ -391,7 +391,7 @@
             (?!                                       # not the start of a
               \%{css:single-identifier-char-regex} |  #   pseudo-class
               [:\\] |                                 #   pseudo-element, escape
-              @\{                                     #   variable interpolation
+              @{                                      #   variable interpolation
             ) |                                       # or
             (?=                                       # ends like a normal declaration
               (?&gt;
@@ -628,7 +628,7 @@
 
     <context id="guard">
       <start>\%[when\%]</start>
-      <end>(?=\{)</end>
+      <end>(?={)</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="guard-operator"/>
         <context ref="css:comment"/>
@@ -650,7 +650,7 @@
     </context>
 
     <context id="variable-interpolation-fragment" style-ref="selector-fragment">
-      <match>(?&lt;=\})\%{css:identifier-chars-regex}</match>
+      <match>(?&lt;=})\%{css:identifier-chars-regex}</match>
     </context>
 
     <context id="less-pseudo-classes" style-ref="css:pseudo-class">
diff --git a/data/language-specs/scss.lang b/data/language-specs/scss.lang
index 4320c486..b5e4bccb 100644
--- a/data/language-specs/scss.lang
+++ b/data/language-specs/scss.lang
@@ -87,8 +87,8 @@
     <!-- interpolations -->
 
     <context id="interpolation">
-      <start>#\{</start>
-      <end>\}</end>
+      <start>#{</start>
+      <end>}</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="interpolation"/>
         <context sub-pattern="0" where="end" style-ref="interpolation"/>
@@ -153,7 +153,7 @@
 
     <context id="bracketed-list">
       <start>\[</start>
-      <end>\]</end>
+      <end>]</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="list-delimiter"/>
         <context sub-pattern="0" where="end" style-ref="list-delimiter"/>
@@ -353,8 +353,8 @@
     <!-- style block -->
 
     <context id="nested-properties" end-parent="true">
-      <start>\{</start>
-      <end>\}</end>
+      <start>{</start>
+      <end>}</end>
       <include>
         <context sub-pattern="0" where="start" style-ref="css:block-delimiter"/>
         <context sub-pattern="0" where="end" style-ref="css:block-delimiter"/>
@@ -381,17 +381,17 @@
       <start extended="true">
         (?(DEFINE)
           (?&lt;interpolation&gt;  # recursive subpattern to find matching brackets
-            \#\{
+            \#{
               (?:
-                (?>
+                (?&gt;
                   (?:
                     [^#{}]+ |
-                    (?! \#\{ | \} ) .
+                    (?! \#{ | } ) .
                   )+
                 ) |
                 (?&amp;interpolation)
               )*
-            \}
+            }
           )
         )
         :
@@ -399,7 +399,7 @@
           (?!                                       # not the start of a
             \%{css:single-identifier-char-regex} |  #   pseudo-class
             [:\\] |                                 #   pseudo-element, escape
-            \#\{                                    #   interpolation
+            \#{                                     #   interpolation
           ) |                                       # or
           (?=                                       # ends like a normal declaration
             (?&gt;
@@ -806,7 +806,7 @@
     </context>
 
     <context id="interpolation-fragment" style-ref="selector-fragment">
-      <match>(?&lt;=\})\%{css:identifier-chars-regex}</match>
+      <match>(?&lt;=})\%{css:identifier-chars-regex}</match>
     </context>
 
 


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