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

Version Path
houston-core-0.8.4 app/helpers/markdown_helper.rb
houston-core-0.8.3 app/helpers/markdown_helper.rb
houston-core-0.8.2 app/helpers/markdown_helper.rb
houston-core-0.8.1 app/helpers/markdown_helper.rb
houston-core-0.8.0 app/helpers/markdown_helper.rb
houston-core-0.8.0.pre2 app/helpers/markdown_helper.rb
houston-core-0.8.0.pre app/helpers/markdown_helper.rb
houston-core-0.7.0 app/helpers/markdown_helper.rb
houston-core-0.7.0.beta4 app/helpers/markdown_helper.rb
houston-core-0.7.0.beta3 app/helpers/markdown_helper.rb
houston-core-0.7.0.beta2 app/helpers/markdown_helper.rb
houston-core-0.7.0.beta app/helpers/markdown_helper.rb
houston-core-0.6.3 app/helpers/markdown_helper.rb