Merge branch 'normalized-urls' of https://github.com/rjgotten/less.js into 1.5.0-wip

Conflicts:
	test/css/static-urls/urls.css
	test/css/urls.css
This commit is contained in:
Luke Page
2013-09-01 18:17:32 +01:00
6 changed files with 50 additions and 11 deletions

View File

@@ -73,13 +73,18 @@ tree.Import.prototype = {
evalPath: function (env) {
var path = this.path.eval(env);
var rootpath = this.currentFileInfo && this.currentFileInfo.rootpath;
if (rootpath && !(path instanceof tree.URL)) {
var pathValue = path.value;
// Add the base path if the import is relative
if (pathValue && env.isPathRelative(pathValue)) {
path.value = rootpath + pathValue;
if (!(path instanceof tree.URL)) {
if (rootpath) {
var pathValue = path.value;
// Add the base path if the import is relative
if (pathValue && env.isPathRelative(pathValue)) {
path.value = rootpath + pathValue;
}
}
path.value = env.normalizePath(path.value);
}
return path;
},
eval: function (env) {