Skip to content

Commit

Permalink
fix the space and test with test code below
Browse files Browse the repository at this point in the history
//var rCSSBindingUrls	= /binding\s*:\s*url\s*\(\s*(?:(['"])|[^'"])([^\1]+)\1\s*\)/g;
var rCSSBindingUrls	= /binding\s*:\s*url\s*\(['"\s]*([^'"\s]+)['"\s]*\)/g;
var aTestStr = [
    'binding: url("ico.xml#bargraph");',
    ' binding : url("ico.xml#bargraph " );',
    'binding : url("ico.xml#bargraph " );',
    'binding: url("ico.xml#bargraph " );',
    'binding:url("ico.xml#bargraph " );',
    ' binding : url (" ico.xml#bargraph " );',
    'binding:url("ico.xml#bargraph " );',
    'binding:url("ico.xml#bargraph" );',
    'binding:url("ico.xml#bargraph");',
    "binding:url('ico.xml#bargraph');"
];

for (var i = 0, iLen = aTestStr.length; i < iLen; i++) {
    console.log(aTestStr[i].match(rCSSBindingUrls), window.RegExp.$1);//window.RegExp.$1);
}
  • Loading branch information
junfan committed May 11, 2011
1 parent cb97e08 commit 27b9cfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/xbl.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//
var rCSSRules = /\s*([^}]+)\s*{([^}]+)}/g,
rCSSBindingUrls = /binding\s*:\s*url\s*\(\s*(?:(['"])|[^'"])([^\1]+)\1\s*\)/g,
rCSSBindingUrls = /binding\s*:\s*url\s*\(['"\s]*([^'"\s]+)['"\s]*\)/g,
rCSSComments = /(\/\*.*?\*\/)/g,
rCSSNameSpaces = /@namespace\s+(\w+)?\s*"([^"]+)";?/g;

Expand Down

0 comments on commit 27b9cfb

Please sign in to comment.