Skip to content

CSS pseudo class syntax bug #6

Description

@GoogleCodeExporter
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.

Original issue reported on code.google.com by [email protected] on 29 May 2011 at 11:18

Attachments:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions