Sha256: 6e5771a5b7a280a0ace972312f87775f00470cc6b3b0a0e54081e876d4475450

Contents?: true

Size: 312 Bytes

Versions: 3

Compression:

Stored size: 312 Bytes

Contents

require 'rdiscount'

module Jack
  class Markdown < Jack::Highlight
    attr_reader   :content, :formatted_content
    
    def initialize(content)
      @content = content
      @formatted_content = RDiscount.new(content)
    end
    
    
    def render
      super(formatted_content.to_html)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jackb-0.0.3 lib/jack/markdown.rb
jackb-0.0.2 lib/jack/markdown.rb
jackb-0.0.1 lib/jack/markdown.rb