Sha256: fe8dc3d9c85ca7607b3fd5af086d8c7416e17b5752e91fbb9b4f2ba31b4447b4

Contents?: true

Size: 468 Bytes

Versions: 5

Compression:

Stored size: 468 Bytes

Contents

module Convert
  module Converters

    # Converts the string into html
    def markdown(string, options = {})
      options = {
        :autolink => true,
        :fenced_code_blocks => true,
        :disable_indented_code_blocks => true,
        :no_intra_emphasis => true
      }.merge(options)

      Redcarpet::Markdown.new(
        Redcarpet::Render::HTML.new(:filter_html => false, :hard_wrap => true),
        options
      ).render(string)
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
convert-0.1.7 lib/converters/markdown.rb
convert-0.1.6 lib/converters/markdown.rb
convert-0.1.5 lib/converters/markdown.rb
convert-0.1.4 lib/converters/markdown.rb
convert-0.1.3 lib/converters/markdown.rb