Sha256: 5108f37810007eb912a6a566a2fa8a0589d3edc50162049dfe6753aca0d3ca83
Contents?: true
Size: 679 Bytes
Versions: 25
Compression:
Stored size: 679 Bytes
Contents
module Roroacms module PrepcontentHelper MARKDOWN = Redcarpet::Markdown.new(Redcarpet::Render::HTML, extensions = {}) # prepares the content for visual display by replacing shortcodes with the html equivalent # Params: # +c+:: is optional, but if you choose to pass it data this has to be a singular post object. # If you don't pass it any content then it will take the globalized content for the page def prep_content(c = '') c = if c == '' @content.post_content elsif c.is_a?(Object) c.post_content else c = c end MARKDOWN.render(c).html_safe end end end
Version data entries
25 entries across 25 versions & 1 rubygems