Sha256: 3d6fb3aa13945a57cf2e64fed7b9d34341b369035d4c97aaa746ddee772fe182
Contents?: true
Size: 565 Bytes
Versions: 3
Compression:
Stored size: 565 Bytes
Contents
# -*- encoding: utf-8 -*- module Webgen::ContentProcessor # Processes content in Textile format using the +redcloth+ library. class RedCloth # Convert the content in +context+ to HTML. 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.alcn, 'RedCloth') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
webgen-0.5.11 | lib/webgen/contentprocessor/redcloth.rb |
webgen-0.5.10 | lib/webgen/contentprocessor/redcloth.rb |
webgen-0.5.9 | lib/webgen/contentprocessor/redcloth.rb |