Created
January 8, 2014 07:28
-
-
Save mamboer/8313062 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="demo"></div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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