Sha256: 373cc550e54e639a0b6a498c7aed0567d85f9d681d970025d5dfe273ad6f80a2

Contents?: true

Size: 445 Bytes

Versions: 4

Compression:

Stored size: 445 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
    end

  end

end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
gettalong-webgen-0.5.8.20090507 lib/webgen/contentprocessor/redcloth.rb
gettalong-webgen-0.5.9.20090620 lib/webgen/contentprocessor/redcloth.rb
gettalong-webgen-0.5.9.20090626 lib/webgen/contentprocessor/redcloth.rb
webgen-0.5.8 lib/webgen/contentprocessor/redcloth.rb