Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nitoyon
Last active December 6, 2015 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nitoyon/2f7833f613f2be2a3e76 to your computer and use it in GitHub Desktop.
Save nitoyon/2f7833f613f2be2a3e76 to your computer and use it in GitHub Desktop.
# reproducable code for https://github.com/vmg/redcarpet/issues/474
# (redcarpet-3.3.3, Windows 10 x64)
require 'redcarpet'
class TestRenderer < Redcarpet::Render::HTML
def emphasis(text)
"a" * 117
end
end
markdown = Redcarpet::Markdown.new(TestRenderer)
puts markdown.render("*a*\n# aaa")
# expected: <h1>a</h1>
# actual: a</h1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment