Skip to content

Commit

Permalink
[Sass] Fixed a bug in Plugin.update_stylesheets when a template_locat…
Browse files Browse the repository at this point in the history
…ion has a trailing slash.
  • Loading branch information
jaredatron authored and nex3 committed Jan 9, 2010
1 parent 207b962 commit 7f89bca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions doc-src/SASS_CHANGELOG.md
Expand Up @@ -19,6 +19,10 @@
* `nil` values for Sass options are now ignored,
rather than raising errors.

* Fix a bug that appears when Plugin template locations
have multiple trailing slashes.
Thanks to [Jared Grippe](http://jaredgrippe.com/).

### Must Read!

* When `@import` is given a filename without an extension,
Expand Down
2 changes: 1 addition & 1 deletion lib/sass/plugin.rb
Expand Up @@ -76,7 +76,7 @@ def update_stylesheets

Dir.glob(File.join(template_location, "**", "*.sass")).each do |file|
# Get the relative path to the file with no extension
name = file.sub(template_location + "/", "")[0...-5]
name = file.sub(template_location.sub(/\/*$/, '/'), "")[0...-5]

if !forbid_update?(name) && (options[:always_update] || stylesheet_needs_update?(name, template_location, css_location))
update_stylesheet(name, template_location, css_location)
Expand Down

0 comments on commit 7f89bca

Please sign in to comment.