Sha256: 2a5a3212e144dfa38c16bda9ffd5e3efbd6d711ddc92867b82938e44aa038818
Contents?: true
Size: 560 Bytes
Versions: 5
Compression:
Stored size: 560 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, 'RedCloth') end end end
Version data entries
5 entries across 5 versions & 1 rubygems