From 6289fa1de1551e116c4d1e49ec6c9f27a61e178f Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 20 Jul 2010 01:23:34 -0700 Subject: [PATCH] [Compass Core] Fixed a bug in inlint-font-files(). --- lib/compass/sass_extensions/functions/inline_image.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compass/sass_extensions/functions/inline_image.rb b/lib/compass/sass_extensions/functions/inline_image.rb index e005e315..515804c3 100644 --- a/lib/compass/sass_extensions/functions/inline_image.rb +++ b/lib/compass/sass_extensions/functions/inline_image.rb @@ -14,14 +14,14 @@ module Compass::SassExtensions::Functions::InlineImage while args.size > 0 path = args.shift.value real_path = File.join(Compass.configuration.fonts_path, path) - url = "url('data:#{compute_mime_type(path,mime_type)};base64,#{data(real_path)}')" + url = "url('data:#{compute_mime_type(path)};base64,#{data(real_path)}')" files << "#{url} format('#{args.shift}')" end Sass::Script::String.new(files.join(", ")) end private - def compute_mime_type(path, mime_type) + def compute_mime_type(path, mime_type = nil) return mime_type if mime_type case path when /\.png$/i