Skip to content

Commit 5b70c21

Browse files
committed
Support quoted strings in declarations
Fixes parsing of `background: url('data:image/jpg;...')`
1 parent aadbb62 commit 5b70c21

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/**
32
* Module dependencies.
43
*/
@@ -113,7 +112,7 @@ module.exports = function(css){
113112
if (!match(/^:\s*/)) return;
114113

115114
// val
116-
var val = match(/^([^};]+)\s*/);
115+
var val = match(/^((?:'[^']*'|"[^"]*"|[^};])+)\s*/);
117116
if (!val) return;
118117
val = val[0].trim();
119118

0 commit comments

Comments
 (0)