lib/nanoc/filters/haml.rb
# Runs the content through [Haml](http://haml-lang.com/).
# Parameters passed to this filter will be passed on to Haml.
#
# @param [String] content The content to filter
#
# @return [String] The filtered content
Runs the content through [Haml].
Parameters passed to this filter will be passed on to Haml.
Runs the content through [ Haml ] . Parameters passed to this filter will be passed on to Haml .
def run(content, params={})
      options = params.merge(:filename => filename)
      context = ::Nanoc::Context.new(assigns)
      proc = assigns[:content] ? lambda { assigns[:content] } : nil
      ::Haml::Engine.new(content, options).render(context, assigns, &proc)
    end
def run ( content , params = { } ) options = params . merge ( :filename => filename ) context = :: Nanoc :: Context . new ( assigns ) proc = assigns [ :content ] ? lambda { assigns [ :content ] } : nil :: Haml :: Engine . new ( content , options ) . render ( context , assigns , & proc ) end
Runs the content through [Haml](http://haml-lang.com/).
Runs the content through [ Haml ] ( http : // haml - lang . com / ) .
# Get options # Create context # Get result
The filtered content
The filtered content
String
content
params
content The content to filter
content The content to filter