Sha256: 0d77d6c92093fb01ff5f19c62e4da48113870b57e97d0e14d4cdc4b697ca5bbe

Contents?: true

Size: 392 Bytes

Versions: 4

Compression:

Stored size: 392 Bytes

Contents

require 'kramdown'

module HtmlEmailCreator
  module Formatters
    class Markdown < Formatter
      def self.extension
        "md"
      end
      
      def self.id
        :md
      end

      def initialize(text, settings)
        super
        @document = Kramdown::Document.new(text)
      end
  
      def format
        @output ||= @document.to_html.strip
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
html_email_creator-1.0.3 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.2 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.1 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.0 lib/html_email_creator/formatters/markdown.rb