From 89442c93b19bd40d588770f8887b2644cf9f955d Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 4 May 2010 18:36:52 -0700 Subject: [PATCH] [Compass Core] Fix a bug that caused quotes strings passed to url() to be wrapped in another set of single quotes. Closes GH-125. --- lib/compass/sass_extensions/functions/urls.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/compass/sass_extensions/functions/urls.rb b/lib/compass/sass_extensions/functions/urls.rb index 00ec2c16..e6bb217d 100644 --- a/lib/compass/sass_extensions/functions/urls.rb +++ b/lib/compass/sass_extensions/functions/urls.rb @@ -11,7 +11,7 @@ module Compass::SassExtensions::Functions::Urls Compass.configuration.http_root_relative(Compass.configuration.css_dir) end - url("#{http_stylesheets_path}/#{path}") + clean_url("#{http_stylesheets_path}/#{path}") end def font_url(path) @@ -30,7 +30,7 @@ module Compass::SassExtensions::Functions::Urls Compass.configuration.http_fonts_path end - url("#{http_fonts_path}/#{path}") + clean_url("#{http_fonts_path}/#{path}") end def image_url(path) @@ -75,18 +75,18 @@ module Compass::SassExtensions::Functions::Urls # prepend the asset host if there is one. path = "#{asset_host}#{'/' unless path[0..0] == "/"}#{path}" if asset_host - url(path) + clean_url(path) end + private + # Emits a url, taking off any leading "./" - def url(url) + def clean_url(url) url = url.to_s url = url[0..1] == "./" ? url[2..-1] : url Sass::Script::String.new("url('#{url}')") end - private - def relative? Compass.configuration.relative_assets? end