Skip to content
Browse files

Updated the HTML and SASS defaults handling so that page defaults are…

… merged

over top of the global defaults.
  • Loading branch information...
1 parent 7650be0 commit c6e184d74b4f6597c5672cd3b84601a9e5af4650 @TwP TwP committed Jun 2, 2008
Showing with 5 additions and 2 deletions.
  1. +3 −0 History.txt
  2. +1 −1 lib/webby/filters/haml.rb
  3. +1 −1 lib/webby/filters/sass.rb
View
3 History.txt
@@ -1,5 +1,8 @@
== 0.9.0 / 2008-06-
+* 1 minor improvement
+ - Global defaults for HAML and SASS [Dag Odenhall]
+
== 0.8.3 / 2008-06-02
* 2 major enhancements
View
2 lib/webby/filters/haml.rb
@@ -2,7 +2,7 @@
# Render text via the Haml library
Webby::Filters.register :haml do |input, cursor|
- opts = cursor.page.haml_options || ::Webby.site.haml_options
+ opts = ::Webby.site.haml_options.merge(cursor.page.haml_options || {})
b = cursor.renderer.get_binding
Haml::Engine.new(input, opts).to_html(b)
end
View
2 lib/webby/filters/sass.rb
@@ -2,7 +2,7 @@
# Render text via the Sass library (part of Haml)
Webby::Filters.register :sass do |input, cursor|
- opts = cursor.page.sass_options || ::Webby.site.sass_options
+ opts = ::Webby.site.sass_options.merge(cursor.page.sass_options || {})
Sass::Engine.new(input, opts).render
end

0 comments on commit c6e184d

Please sign in to comment.
Something went wrong with that request. Please try again.