Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 6 by [email protected]: CSS pseudo class syntax bug
http://code.google.com/p/vim/issues/detail?id=6

What steps will reproduce the problem?
1. Enable syntax highlighting, set the filetype to CSS (open a CSS file).
2. Type in the following (note no space between the brace and the :hover):
a:hover{
  color:black;
}

What is the expected output? What do you see instead?
See before and after screenshots. CSS properties are not syntax highlighted and the '}' brace is highlighted as having a no-matching-bracket error.

What version of the product are you using? On what operating system?
Hg tip has the problem.

Please provide any additional information below.
The problem is the regex used to match pseudo-classes (PS) also matches the '{' character if there's no space between the PS and the '{'.

The attached patch corrects the regex to only match alphabet characters and hyphens.


Attachments:
        before-patch.png  843 bytes
        after-patch.png  693 bytes
        css-syntax-fix.patch  857 bytes

--
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

Raspunde prin e-mail lui