Skip to content

Commit 7f692ae

Browse files
committed
Sync url() fix.
1 parent 05c3ef4 commit 7f692ae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

parse-css.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function tokenize(str) {
115115
return codepoint == -1;
116116
};
117117
var donothing = function() {};
118-
var parseerror = function() { console.log("Parse error at index " + i + ", processing codepoint 0x" + code.toString(16) + " in state " + state + ".");return true; };
118+
var parseerror = function() { console.log("Parse error at index " + i + ", processing codepoint 0x" + code.toString(16) + ".");return true; };
119119

120120
var consumeAToken = function() {
121121
consumeComments();
@@ -299,9 +299,10 @@ function tokenize(str) {
299299
var str = consumeAName();
300300
if(str.toLowerCase() == "url" && next() == 0x28) {
301301
consume();
302-
while(whitespace(next())) consume();
302+
while(whitespace(next(1)) && whitespace(next(2))) consume();
303303
if(next() == 0x22 || next() == 0x27) {
304-
reconsume();
304+
return new FunctionToken(str);
305+
} else if(whitespace(next()) && (next(2) == 0x22 || next(2) == 0x27)) {
305306
return new FunctionToken(str);
306307
} else {
307308
return consumeAURLToken();

0 commit comments

Comments
 (0)