tent.io/lib/markdown_html.rb
Jonathan Rudenberg c0ca040c2c Do stuff
2012-08-22 11:17:22 -04:00

15 lines
357 B
Ruby

require 'pygments.rb'
RubyPython.start python_exe: 'python2.6' if ENV['RACK_ENV'] == 'production'
class MarkdownHTML < Redcarpet::Render::HTML
include Redcarpet::Render::SmartyPants
def initialize(options={})
super options.merge(with_toc_data: true)
end
def block_code(code, language)
Pygments.highlight(code, lexer: language)
end
end