Parent

Methods

Class/Module Index [+]

Quicksearch

Webgen::ContentProcessor::Maruku

Processes content in Markdown format using the maruku library.

Public Instance Methods

call(context) click to toggle source

Convert the content in context to HTML.

# File lib/webgen/contentprocessor/maruku.rb, line 22
def call(context)
  require 'maruku'
  $uid = 0 #fix for invalid fragment ids on second run
  context.content = ::Maruku.new(context.content, :on_error => :raise).to_html
  context
rescue LoadError
  raise Webgen::LoadError.new('maruku', self.class.name, context.dest_node, 'maruku')
rescue Exception => e
  raise Webgen::RenderError.new(e, self.class.name, context.dest_node, context.ref_node)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.