Sha256: a18a94eaa906440ce6dff887c3edc6ba8b3fba83050b2c47496035595f67a640

Contents?: true

Size: 429 Bytes

Versions: 12

Compression:

Stored size: 429 Bytes

Contents

require 'bluecloth'

module Awestruct

  module Blueclothable
    def render(context)
      rendered = ''
      begin
        doc = BlueCloth.new( context.interpolate_string( raw_page_content ) )
        rendered = doc.to_html
      rescue => e
        puts e
        puts e.backtrace
      end
      rendered
    end

    def content
      context = site.engine.create_context( self )
      render( context )
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
awestruct-0.1.9 lib/awestruct/blueclothable.rb
awestruct-0.1.8 lib/awestruct/blueclothable.rb
awestruct-0.1.7 lib/awestruct/blueclothable.rb
awestruct-0.1.6 lib/awestruct/blueclothable.rb
awestruct-0.1.5 lib/awestruct/blueclothable.rb
awestruct-0.1.4 lib/awestruct/blueclothable.rb
awestruct-0.1.3 lib/awestruct/blueclothable.rb
awestruct-0.1.2 lib/awestruct/blueclothable.rb
awestruct-0.1.1 lib/awestruct/blueclothable.rb
awestruct-0.1.0 lib/awestruct/blueclothable.rb
awestruct-0.0.9 lib/awestruct/blueclothable.rb
awestruct-0.0.8 lib/awestruct/blueclothable.rb