diff --git a/lib/parse/index.js b/lib/parse/index.js index 053f0596..07740f68 100644 --- a/lib/parse/index.js +++ b/lib/parse/index.js @@ -224,7 +224,7 @@ module.exports = function(css, options){ if (!match(/^:\s*/)) return error("property missing ':'"); // val - var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/); + var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((:?'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^\)]*?)\)|[^};])+)/); var ret = pos({ type: 'declaration', diff --git a/test/cases/quoted/ast.json b/test/cases/quoted/ast.json index 8b3d6001..a14dfd5a 100644 --- a/test/cases/quoted/ast.json +++ b/test/cases/quoted/ast.json @@ -11,7 +11,7 @@ { "type": "declaration", "property": "background", - "value": "url('some;stuff;here') 50% 50% no-repeat", + "value": "url('some;stuff();here') 50% 50% no-repeat", "position": { "start": { "line": 2, @@ -19,7 +19,7 @@ }, "end": { "line": 2, - "column": 55 + "column": 57 }, "source": "input.css" } diff --git a/test/cases/quoted/compressed.css b/test/cases/quoted/compressed.css index dd590eaa..3638d826 100644 --- a/test/cases/quoted/compressed.css +++ b/test/cases/quoted/compressed.css @@ -1 +1 @@ -body{background:url('some;stuff;here') 50% 50% no-repeat;} +body{background:url('some;stuff();here') 50% 50% no-repeat;} diff --git a/test/cases/quoted/input.css b/test/cases/quoted/input.css index db593220..6206ba65 100644 --- a/test/cases/quoted/input.css +++ b/test/cases/quoted/input.css @@ -1,3 +1,3 @@ body { - background: url('some;stuff;here') 50% 50% no-repeat; + background: url('some;stuff();here') 50% 50% no-repeat; } diff --git a/test/cases/quoted/output.css b/test/cases/quoted/output.css index db593220..6206ba65 100644 --- a/test/cases/quoted/output.css +++ b/test/cases/quoted/output.css @@ -1,3 +1,3 @@ body { - background: url('some;stuff;here') 50% 50% no-repeat; + background: url('some;stuff();here') 50% 50% no-repeat; }