Sha256: bbde7faf9424d55de67792e08e3d66f6305b3ba42ffef0ea9562de1b59b16528

Contents?: true

Size: 414 Bytes

Versions: 12

Compression:

Stored size: 414 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, :input => 'markdown')
      end
  
      def format
        @output ||= @document.to_html.strip
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
html_email_creator-1.0.18 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.16 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.15 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.14 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.13 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.10 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.9 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.8 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.7 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.6 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.5 lib/html_email_creator/formatters/markdown.rb
html_email_creator-1.0.4 lib/html_email_creator/formatters/markdown.rb