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.
This commit is contained in:
parent
f546c7fa75
commit
900ede244c
1 changed files with 1 additions and 1 deletions
|
@ -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 "\\)\\|"
|
||||
|
|
Loading…
Add table
Reference in a new issue