Skip to content

Commit

Permalink
Fix url() parsing without quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
phgn0 authored Mar 11, 2022
1 parent 0939fbd commit c85c52b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/parse/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ module.exports = function(css, options){
// :
if (!match(/^:\s*/)) return error("property missing ':'");

// val
var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?['"]\)|[^};])+)/);
// Quotes regex repeats verbatim inside and outside parentheses
var val = match(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/);

var ret = pos({
type: 'declaration',
Expand Down

0 comments on commit c85c52b

Please sign in to comment.