Sha256: 13d3c08c3a649a03b1536df0fab4655e041ae26445f62915551767507c5ba994
Contents?: true
Size: 334 Bytes
Versions: 3
Compression:
Stored size: 334 Bytes
Contents
class RedcarpetText < String attr_reader :text attr_reader :markdown_processor def initialize(text, options = {}) super(text) @text = text @markdown_processor = Redcarpet::Markdown.new(Redcarpet::Render::HTML, {:autolink => true}.merge(options)) end def to_html markdown_processor.render(text) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
acts_as_markup-2.0.2 | lib/acts_as_markup/exts/redcarpet.rb |
acts_as_markup-2.0.1 | lib/acts_as_markup/exts/redcarpet.rb |
acts_as_markup-2.0.0 | lib/acts_as_markup/exts/redcarpet.rb |