Sha256: 2524cc4b86d45431b6b4e2e2e3df685b8b08ffc13ec8e92a21cbb39d8b11698f
Contents?: true
Size: 494 Bytes
Versions: 4
Compression:
Stored size: 494 Bytes
Contents
# Documentation for RedCarpet: https://github.com/vmg/redcarpet class MarkdownWriter def self.to_html(markdown) renderer = Redcarpet::Render::HTML.new(filter_html: false, no_styles: true, no_images: false, with_toc_data: false, link_attributes: {:target => "_blank"} ) converter = Redcarpet::Markdown.new(renderer) output = converter.render(markdown) end def self.update_html(obj) obj.content_html = MarkdownWriter.to_html(obj.content_md) end end
Version data entries
4 entries across 4 versions & 3 rubygems