Sha256: 998935a5c1a0a98e68b3b9370b9c65d28fbb8104d93660a2e6386829d4b6a206

Contents?: true

Size: 288 Bytes

Versions: 4

Compression:

Stored size: 288 Bytes

Contents

# frozen_string_literal: true

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

4 entries across 4 versions & 1 rubygems

Version Path
auto_html-2.2.0 lib/auto_html/markdown.rb
auto_html-2.1.1 lib/auto_html/markdown.rb
auto_html-2.1.0 lib/auto_html/markdown.rb
auto_html-2.0.2 lib/auto_html/markdown.rb