module Webgen::ContentProcessor::Haml

Processes content in Haml markup using the haml library.

Public Class Methods

call(context) click to toggle source

Convert the content in haml markup to HTML.

   # File lib/webgen/content_processor/haml.rb
12 def self.call(context)
13   context.content = ::Haml::Engine.new(context.content, :filename => context.ref_node.alcn).
14     render(Object.new, :context => context)
15   context
16 rescue ::Haml::Error => e
17   line = (e.line ? e.line + 1 : Webgen::Error.error_line(e))
18   raise Webgen::RenderError.new(e, 'content_processor.haml', context.dest_node, nil, line)
19 end