Skip to content

Commit 832c900

Browse files
committed
Fix #27: line number tracking inside url()
1 parent 6a0eb50 commit 832c900

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tokenizer.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,11 @@ fn consume_url(tokenizer: &mut Tokenizer) -> ComponentValue {
461461
tokenizer.position += 1; // Skip the ( of url(
462462
while !tokenizer.is_eof() {
463463
match tokenizer.current_char() {
464-
'\t' | '\n' | ' ' => tokenizer.position += 1,
464+
' ' | '\t' => tokenizer.position += 1,
465+
'\n' => {
466+
tokenizer.position += 1;
467+
tokenizer.new_line();
468+
},
465469
'"' => return consume_quoted_url(tokenizer, false),
466470
'\'' => return consume_quoted_url(tokenizer, true),
467471
')' => { tokenizer.position += 1; break },

0 commit comments

Comments
 (0)