Module: Webgen::ContentProcessor::RedCloth
- Defined in:
- lib/webgen/content_processor/red_cloth.rb
Overview
Processes content in Textile format using the redcloth
library.
Class Method Summary collapse
-
.call(context) ⇒ Object
Convert the content in
context
to HTML.
Class Method Details
.call(context) ⇒ Object
Convert the content in context
to HTML.
13 14 15 16 17 18 |
# File 'lib/webgen/content_processor/red_cloth.rb', line 13 def self.call(context) doc = ::RedCloth.new(context.content) doc.hard_breaks = context.website.config['content_processor.redcloth.hard_breaks'] context.content = doc.to_html context end |