Skip to content

Instantly share code, notes, and snippets.

@mamboer
Created January 8, 2014 07:28
Show Gist options
  • Save mamboer/8313062 to your computer and use it in GitHub Desktop.
Save mamboer/8313062 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div id="demo"></div>
</body>
</html>
var reg1 = /background:url\(([^)]*)\)?/gi,
processRelativeImg = function(rawCss,parentFile){
//TODO:
return rawCss;
};
var testCss = ".test {background:url(../img/x.png);}",
testParentFile = "E:\\work\\test\\index.css";
var css = processRelativeImg(testCss,testParentFile);
document.getElementById('demo').innerHTML = css;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment