Skip to content

Instantly share code, notes, and snippets.

@siruguri
Created September 18, 2013 02:45
Show Gist options
  • Save siruguri/6603806 to your computer and use it in GitHub Desktop.
Save siruguri/6603806 to your computer and use it in GitHub Desktop.
Redcarpet test code for footnotes
require 'redcarpet'
def test_that_footnotes_work
markdown = <<MD
This is a footnote.[^1]
[^1]: It provides additional information.
MD
renderer = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :footnotes => true)
output = renderer.render(markdown)
puts output
end
test_that_footnotes_work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment