emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/jade-mode 1b86926046 061/128: Refined and extended syntax


From: ELPA Syncer
Subject: [nongnu] elpa/jade-mode 1b86926046 061/128: Refined and extended syntax highlighting
Date: Sat, 29 Jan 2022 08:24:47 -0500 (EST)

branch: elpa/jade-mode
commit 1b869260464de75b094a4e5ef8e68b908fe5f2c5
Author: Gavin Cannizzaro <public@gavinpc.com>
Commit: Gavin Cannizzaro <public@gavinpc.com>

    Refined and extended syntax highlighting
    
    - Capturing class names that include hyphens
    - Capturing id selectors that include hyphens
    - Capturing standalone (unitless) integers
    - Capturing directives (@) and "backreferences" (same-rule property 
references)
---
 stylus-mode.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/stylus-mode.el b/stylus-mode.el
index 46cc196249..9849697ea2 100644
--- a/stylus-mode.el
+++ b/stylus-mode.el
@@ -47,9 +47,12 @@
      0 font-lock-constant-face)
     (,(concat "[^_$]?\\<\\(" stylus-keywords "\\)\\>[^_]?")
      0 font-lock-keyword-face)
-    
(,"\\([.0-9]+:?\\(em\\|ex\\|px\\|mm\\|cm\\|in\\|pt\\|pc\\|deg\\|rad\\|grad\\|ms\\|s\\|Hz\\|kHz\\|rem\\|%\\)\\)"
 0 font-lock-constant-face)
-    (,"#\\w+" 0 font-lock-keyword-face)
+    (,"#\\w[a-zA-Z0-9\\-]+" 0 font-lock-keyword-face) ; id selectors (also 
colors...)
+    
(,"\\([.0-9]+:?\\(em\\|ex\\|px\\|mm\\|cm\\|in\\|pt\\|pc\\|deg\\|rad\\|grad\\|ms\\|s\\|Hz\\|kHz\\|rem\\|%\\)\\b\\)"
 0 font-lock-constant-face)
+    (,"\\b[0-9]+\\b" 0 font-lock-constant-face)
+    (,"\\.\\w[a-zA-Z0-9\\-]+" 0 font-lock-type-face) ; class names
     (,"$\\w+" 0 font-lock-variable-name-face)
+    (,"@\\w[a-zA-Z0-9\\-]+" 0 font-lock-preprocessor-face) ; directives and 
backreferences
     ))
 
 (defvar stylus-syntax-table



reply via email to

[Prev in Thread] Current Thread [Next in Thread]