Skip to content

Commit 5862400

Browse files
committed
refactor
1 parent 48bb43a commit 5862400

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ module.exports = function(css){
158158
if (!m) return;
159159
var name = m[1];
160160

161-
// {
162161
if (!open()) return;
163162
comments();
164163

@@ -187,14 +186,12 @@ module.exports = function(css){
187186
if (!m) return;
188187
var media = m[1].trim();
189188

190-
// {
191-
if (!match(/^{\s*/)) return;
189+
if (!open()) return;
192190
comments();
193191

194192
var style = rules();
195193

196-
// }
197-
if (!match(/^}\s*/)) return;
194+
if (!close()) return;
198195

199196
return { media: media, rules: style };
200197
}

0 commit comments

Comments
 (0)