Sha256: a48615f2b1743bef63295ffb4b57039694ab90f57cac9e32c9305eff8533a03c

Contents?: true

Size: 586 Bytes

Versions: 15

Compression:

Stored size: 586 Bytes

Contents

require 'redcarpet'

module Locomotive
  module Wagon
    module Markdown

      def self.render(text)
        self.parser.render(text)
      end

      def self.parser
        @@markdown ||= Redcarpet::Markdown.new Redcarpet::Render::HTML, {
          autolink:         true,
          fenced_code:      true,
          generate_toc:     true,
          gh_blockcode:     true,
          hard_wrap:        true,
          no_intraemphasis: true,
          strikethrough:    true,
          tables:           true,
          xhtml:            true
        }
      end

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
locomotivecms_wagon-1.5.8 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.5.7 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.5.6 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.5.5 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.5.4 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.5.3 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.5.2 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.5.1 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.5.0 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.5.0.rc1 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.4.0 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.3.3 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.3.2 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.3.1 lib/locomotive/wagon/misc/markdown.rb
locomotivecms_wagon-1.3.0 lib/locomotive/wagon/misc/markdown.rb