Skip to content
Snippets Groups Projects
Commit 87cd5b34 authored by Brandon Frohs's avatar Brandon Frohs Committed by Marijn Haverbeke
Browse files

[css] Fix class matching.

This basically matches the CSS3 spec (except it doesn't match non-ascii characters).
parent 73336a64
No related branches found
No related tags found
No related merge requests found
......@@ -228,7 +228,7 @@ CodeMirror.defineMode("css", function(config) {
else if (/[,+>*\/]/.test(ch)) {
return ret(null, "select-op");
}
else if (ch == "." && stream.match(/^\w+/)) {
else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
return ret("qualifier", type);
}
else if (ch == ":") {
......
......@@ -217,9 +217,9 @@ MT.testMode(
MT.testMode(
'classSelector',
'.foo { }',
'.foo-bar_hello { }',
[
'qualifier', '.foo',
'qualifier', '.foo-bar_hello',
null, ' { }'
]
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment