module Ruhoh::Converter::Markdown

Public Class Methods

convert(content) click to toggle source
# File lib/ruhoh/converters/markdown.rb, line 9
def self.convert(content)
  require 'redcarpet'
  markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(:with_toc_data => true),
    :autolink => true, 
    :fenced_code_blocks => true, 
  )
  markdown.render(content)
end
extensions() click to toggle source
# File lib/ruhoh/converters/markdown.rb, line 5
def self.extensions
  ['.md', '.markdown']
end