module Slideshow::MarkdownEngines

Public Instance Methods

markdown_to_html( content ) click to toggle source

note: for now keep it simple use just kramdown

# File lib/slideshow/markdown.rb, line 8
def markdown_to_html( content )    
  ## note: set to gfm (github-flavored markdown) by default
  ##   see http://kramdown.gettalong.org/parser/gfm.html
  kramdown_config = {
    'input'     => 'GFM',
    'hard_wrap' => false
  }

  puts "  Converting markdown-text (#{content.length} bytes) to HTML using kramdown library with #{kramdown_config.inspect}..."
  
  Kramdown::Document.new( content, kramdown_config ).to_html
end