Sha256: 877b786c5abe1af2fb7f45c224e478679e068b7acf6f5a1b3d4536f503e444f7

Contents?: true

Size: 257 Bytes

Versions: 1

Compression:

Stored size: 257 Bytes

Contents

require 'redcarpet'

module AutoHtml
  # Markdown filter
  class Markdown
    def initialize
      render = Redcarpet::Render::HTML
      @markdown = Redcarpet::Markdown.new(render)
    end

    def call(text)
      @markdown.render(text)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
auto_html-2.0.0 lib/auto_html/markdown.rb