diff options
| author | Wilfred Hughes | 2017-10-20 15:04:37 +0100 |
|---|---|---|
| committer | Wilfred Hughes | 2017-10-20 15:04:37 +0100 |
| commit | 900ede244c886c56579dcbfabd04cf4f144275a1 (patch) | |
| tree | 3d9ab756bf6bf722cf193aaab9a06e34be127007 | |
| parent | f546c7fa751620c22722da24749cf34ead2a3b47 (diff) | |
| download | emacs-900ede244c886c56579dcbfabd04cf4f144275a1.tar.gz emacs-900ede244c886c56579dcbfabd04cf4f144275a1.zip | |
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.
| -rw-r--r-- | lisp/textmodes/css-mode.el | 2 |
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', | |||
| 896 | ;; No face. | 896 | ;; No face. |
| 897 | nil))) | 897 | nil))) |
| 898 | ;; Variables. | 898 | ;; Variables. |
| 899 | (,(concat "--" css-ident-re) (0 font-lock-variable-name-face)) | 899 | (,(concat (rx symbol-start) "--" css-ident-re) (0 font-lock-variable-name-face)) |
| 900 | ;; Properties. Again, we don't limit ourselves to css-property-ids. | 900 | ;; Properties. Again, we don't limit ourselves to css-property-ids. |
| 901 | (,(concat "\\(?:[{;]\\|^\\)[ \t]*\\(" | 901 | (,(concat "\\(?:[{;]\\|^\\)[ \t]*\\(" |
| 902 | "\\(?:\\(" css-proprietary-nmstart-re "\\)\\|" | 902 | "\\(?:\\(" css-proprietary-nmstart-re "\\)\\|" |