Hi Jules, Bram, and team

I found that highlight of CSS's class names is broken in below cases:

- class name is one character
- class name starts with under score

I fixed them. Please find attached css.vim.patch.

Repro: Execute below shell commands

-------------------------------------

$ cat <<-EOS > test.css
._foo {
  margin: 0;
}

.a {
  margin: 0;
}
EOS

$ vim test.css

-------------------------------------

My environment:

- macOS 10.12
- Vim 8.0-114 (MacVim)


Thanks,
Hayashida

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim
index 3dc3f5c..a66cbdc 100644
--- a/runtime/syntax/css.vim
+++ b/runtime/syntax/css.vim
@@ -56,7 +56,7 @@ syn match cssSelectorOp2 "[~|^$*]\?=" contained
 syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
 
 " .class and #id
-syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+" contains=cssClassNameDot
+syn match cssClassName "\.[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot
 syn match cssClassNameDot contained '\.'
 
 try

Raspunde prin e-mail lui