From 5b70c21026bbf3897439388a0845782e274079fc Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Sun, 2 Sep 2012 01:16:02 +0800 Subject: [PATCH] Support quoted strings in declarations Fixes parsing of `background: url('data:image/jpg;...')` --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 2cacbf8..32b625e 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,3 @@ - /** * Module dependencies. */ @@ -113,7 +112,7 @@ module.exports = function(css){ if (!match(/^:\s*/)) return; // val - var val = match(/^([^};]+)\s*/); + var val = match(/^((?:'[^']*'|"[^"]*"|[^};])+)\s*/); if (!val) return; val = val[0].trim();