File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 8
8
background: black
9
9
color : white
10
10
11
+ / / just an example comment
12
+
11
13
butto n
14
+ / / moar comments
15
+ // hurrrrrrrr
12
16
bor der-radius: 5px
13
17
padding: 5px 10px
14
18
box-shadow:
@@ -17,9 +21,10 @@ button
17
21
inset 0 0 3px blue
18
22
19
23
@media print
24
+ / / some stuff
20
25
body
21
26
padding: 0
22
27
23
28
butto n
24
29
bor der-radius: 0
25
- width: 100%
30
+ width: 100%
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ module.exports = function(str) {
44
44
function next ( ) {
45
45
return stashed ( )
46
46
|| blank ( )
47
+ || comment ( )
47
48
|| indentation ( )
48
49
|| prop ( )
49
50
|| rule ( ) ;
@@ -68,6 +69,18 @@ module.exports = function(str) {
68
69
return next ( ) ;
69
70
}
70
71
72
+ /**
73
+ * Comment.
74
+ */
75
+
76
+ function comment ( ) {
77
+ var m = str . match ( / ^ \/ \/ ( [ ^ \n ] * ) / ) ;
78
+ if ( ! m ) return ;
79
+ str = str . slice ( m [ 0 ] . length ) ;
80
+ return next ( ) ;
81
+ }
82
+
83
+
71
84
/**
72
85
* INDENT
73
86
* | OUTDENT
You can’t perform that action at this time.
0 commit comments