diff --git a/lib/compass/sass_extensions/sprites/sprite_map.rb b/lib/compass/sass_extensions/sprites/sprite_map.rb index 10f860e1..121c4e12 100644 --- a/lib/compass/sass_extensions/sprites/sprite_map.rb +++ b/lib/compass/sass_extensions/sprites/sprite_map.rb @@ -25,7 +25,7 @@ module Compass # Returns the Glob of image files for this sprite def files - @files ||= Dir[File.join(Compass.configuration.images_path, uri).gsub('/*', '/**/*')].sort + @files ||= Dir[File.join(Compass.configuration.images_path, uri)].sort end # Returns an Array of image names without the file extension diff --git a/lib/compass/sass_extensions/sprites/sprites.rb b/lib/compass/sass_extensions/sprites/sprites.rb index 7696d3bd..7431983f 100644 --- a/lib/compass/sass_extensions/sprites/sprites.rb +++ b/lib/compass/sass_extensions/sprites/sprites.rb @@ -3,8 +3,8 @@ module Compass attr_accessor :name, :path def self.path_and_name(uri) - if uri =~ %r{((.+/)?(.+))/(.+?)\.png} - [$1, $3, $4] + if uri =~ %r{((.+/)?([^\*.]+))/(.+?)\.png} + [$1, $3] end end diff --git a/test/integrations/sprites_test.rb b/test/integrations/sprites_test.rb index ea077625..23a45996 100644 --- a/test/integrations/sprites_test.rb +++ b/test/integrations/sprites_test.rb @@ -590,7 +590,7 @@ class SpritesTest < Test::Unit::TestCase it "should generate a sprite from nested folders" do css = render <<-SCSS - @import "nested/*.png"; + @import "nested/**/*.png"; @include all-nested-sprites; SCSS assert_correct css, <<-CSS