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
3 |
# File 'ext/github_markup.rb', line 3 alias_method :old_render, :render |
#render(filename, content = nil) ⇒ Object
4 5 6 7 8 9 10 |
# File 'ext/github_markup.rb', line 4 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 |