Started by looking at how GitHub renders markdown and found they use the Redcarpet gem. The examples in the documentation combined with the ruby-redcarpet Ubuntu package make this a pretty simple exercise in upgrading my Markdown renderer:
- Install the Redcarpet gem:
- Replace ye olde Markdown.cgi with new hotness Markdown.cgi
- Start your browser, surf the docs!
apt-get install ruby-redcarpet
#!/usr/bin/ruby require 'redcarpet' print "Content-type: text/html\n\n" markdown = Redcarpet::Markdown.new( Redcarpet::Render::HTML, :autolink => true, :fenced_code_blocks => true, ) puts markdown.render(File.read(ENV['PATH_TRANSLATED']))
UPDATE: I've updated my renderer for Markdown.