Parent

Methods

Class/Module Index [+]

Quicksearch

Webgen::ContentProcessor::RedCloth

Processes content in Textile format using the redcloth library.

Public Instance Methods

call(context) click to toggle source

Convert the content in context to HTML.

# File lib/webgen/contentprocessor/redcloth.rb, line 8
def call(context)
  require 'redcloth'
  doc = ::RedCloth.new(context.content)
  doc.hard_breaks = context.website.config['contentprocessor.redcloth.hard_breaks']
  context.content = doc.to_html
  context
rescue LoadError
  raise Webgen::LoadError.new('redcloth', self.class.name, context.dest_node, 'RedCloth')
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.