Module: GitHub::Markup
- Defined in:
- ext/github_markup.rb
Overview
Monkey patch github markup to use redcarpet with support for autolinks and tables
Instance Method Summary collapse
Instance Method Details
#old_render ⇒ Object
5 |
# File 'ext/github_markup.rb', line 5 alias_method :old_render, :render |
#render(filename, content = nil) ⇒ Object
6 7 8 9 10 11 12 |
# File 'ext/github_markup.rb', line 6 def render(filename, content = nil) if Regexp.compile("\\.(md|mkdn?|mdwn|mdown|markdown|litcoffee)$") =~ filename Redcarpet::Markdown.new(Redcarpet::Render::HTML, :autolink => true, :tables => true).render(content) else old_render(filename, content) end end |