Sha256: 254a258136f1b9deaff9df5f1567e22be88988439e596c52e4c609910c29ac5f
Contents?: true
Size: 651 Bytes
Versions: 2
Compression:
Stored size: 651 Bytes
Contents
require 'bluecloth' module Awestruct module Blueclothable def render(context) rendered = '' begin bluecloth_options = { :smartypants => true } unless self.options.nil? bluecloth_options.merge!({ :smartypants => false }) if self.options[:html_entities] == false end doc = BlueCloth.new( context.interpolate_string( raw_page_content ), bluecloth_options ) 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
awestruct-0.2.1 | lib/awestruct/blueclothable.rb |
awestruct-0.2.0 | lib/awestruct/blueclothable.rb |