summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2017-10-20 15:04:37 +0100
committerWilfred Hughes <me@wilfred.me.uk>2017-10-20 15:04:37 +0100
commit900ede244c886c56579dcbfabd04cf4f144275a1 (patch)
tree3d9ab756bf6bf722cf193aaab9a06e34be127007 /lisp/textmodes
parentf546c7fa751620c22722da24749cf34ead2a3b47 (diff)
downloademacs-900ede244c886c56579dcbfabd04cf4f144275a1.tar.gz
css-mode: Don't confuse variable names with class names
This fixes highlighting for class names that contain --, for example: .foo--bar { display: none; } * lisp/textmodes/css-mode.el (css--font-lock-keywords): Make regular expression stricter.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/css-mode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 9022ab7c3fb..0a4cb998b57 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -896,7 +896,7 @@ cannot be completed sensibly: `custom-ident',
;; No face.
nil)))
;; Variables.
- (,(concat "--" css-ident-re) (0 font-lock-variable-name-face))
+ (,(concat (rx symbol-start) "--" css-ident-re) (0 font-lock-variable-name-face))
;; Properties. Again, we don't limit ourselves to css-property-ids.
(,(concat "\\(?:[{;]\\|^\\)[ \t]*\\("
"\\(?:\\(" css-proprietary-nmstart-re "\\)\\|"