Skip to content

Commit 6e18076

Browse files
committed
fix // declaration hack. Closes #42
1 parent e20ee58 commit 6e18076

File tree

3 files changed

+60
-1
lines changed

3 files changed

+60
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ module.exports = function(css, options){
179179
var pos = position();
180180

181181
// prop
182-
var prop = match(/^(\*?[-\w]+)\s*/);
182+
var prop = match(/^(\*?[//*-\w]+)\s*/);
183183
if (!prop) return;
184184
prop = prop[0];
185185

test/cases/wtf.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.wtf {
2+
*overflow-x: hidden;
3+
//max-height: 110px;
4+
}

test/cases/wtf.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"type": "stylesheet",
3+
"stylesheet": {
4+
"rules": [
5+
{
6+
"type": "rule",
7+
"selectors": [
8+
".wtf"
9+
],
10+
"declarations": [
11+
{
12+
"type": "declaration",
13+
"property": "*overflow-x",
14+
"value": "hidden",
15+
"position": {
16+
"start": {
17+
"line": 2,
18+
"column": 3
19+
},
20+
"end": {
21+
"line": 2,
22+
"column": 22
23+
}
24+
}
25+
},
26+
{
27+
"type": "declaration",
28+
"property": "//max-height",
29+
"value": "110px",
30+
"position": {
31+
"start": {
32+
"line": 3,
33+
"column": 3
34+
},
35+
"end": {
36+
"line": 3,
37+
"column": 22
38+
}
39+
}
40+
}
41+
],
42+
"position": {
43+
"start": {
44+
"line": 1,
45+
"column": 1
46+
},
47+
"end": {
48+
"line": 4,
49+
"column": 2
50+
}
51+
}
52+
}
53+
]
54+
}
55+
}

0 commit comments

Comments
 (0)