IslamHasan / hyperlight

Automatically exported from code.google.com/p/hyperlight
0 stars 0 forks source link

Formatting breaks early on CSS selectors that contain underscores #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a CSS selector such as div#main_content or h2.sub_heading

What is the expected output? What do you see instead?
highlighting for class or id only matches up to the underscore, leaves the 
underscore as plain text node, and matches the rest of the class or id as a 
keyword

What version of the product are you using? On what operating system?
Using r52 straight from SVN, Windows 7, PHP 5.2.9

Please provide any additional information below.

Original issue reported on code.google.com by AshleyJS...@gmail.com on 2 May 2012 at 1:00

GoogleCodeExporter commented 9 years ago
I had a quick look at this today and I think it just needs a change to the CSS 
language file. Adding in the underscore to $nmstart and $nmchar (lines 19 & 20) 
seems to do the trick:

$nmstart = '-?[a-z_]';
$nmchar = '[_a-z0-9-]';

Original comment by AshleyJS...@gmail.com on 3 May 2012 at 1:02