From 334f224d7efb379acecdf9ce7a18cc84df0d7391 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Sun, 25 Jul 2010 16:44:27 -0400 Subject: [PATCH] squeeze extra slashes in url() --- lib/less/tree/url.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/less/tree/url.js b/lib/less/tree/url.js index 62549ead..02d34855 100644 --- a/lib/less/tree/url.js +++ b/lib/less/tree/url.js @@ -2,10 +2,8 @@ tree.URL = function (val, paths) { // Add the base path if the URL is relative and we are in the browser - if (!/^(?:http:\/)?\//.test(val.value) && - paths.length > 0 && - typeof(window) !== 'undefined') { - val.value = [paths[0], val.value].join('/'); + if (!/^(?:http:\/)?\//.test(val.value) && paths.length > 0 && typeof(window) !== 'undefined') { + val.value = [paths[0], val.value].join('/').replace('//', '/'); } this.value = val; };