Sha256: 0dd39c9f12caffda65c672c73a1e3825bdcd428b15afd9f20f3780179462f2a3
Contents?: true
Size: 590 Bytes
Versions: 13
Compression:
Stored size: 590 Bytes
Contents
module MarkdownHelper include EmojiHelper def markdown @markdown ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, # parse and identify links lax_spacing: true, # don't require extra line breaks space_after_headers: false, # don't require there to be a space between # and a header no_intra_emphasis: true) # don't italicize bar in foo_bar_baz end def mdown(text) return "" if text.blank? emojify markdown.render(text).html_safe end def slackdown(text) Slackdown.new(text).convert end end
Version data entries
13 entries across 13 versions & 1 rubygems