Permalink
Browse files

Merge remote-tracking branch 'grosser/fence_without_space'

  • Loading branch information...
2 parents 8d883a5 + de2c102 commit 834d039140d2a4daeef242a8de05e6b66ea6fa44 @vmg committed Oct 10, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/redcarpet_test.rb
View
@@ -311,6 +311,15 @@ def test_that_fenced_flag_works
assert render_with({:fenced_code_blocks => true}, text) =~ /<code/
end
+ def test_that_fenced_flag_works_without_space
+ text = "foo\nbar\n```\nsome\ncode\n```\nbaz"
+ out = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :fenced_code_blocks => true, :lax_html_blocks => true).render(text)
+ assert_include out, "<pre><code>"
+
+ out = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :fenced_code_blocks => true).render(text)
+ assert_include out, "<pre><code>"
+ end
+
def test_that_headers_are_linkable
markdown = @markdown.render('### Hello [GitHub](http://github.com)')
html_equal "<h3>Hello <a href=\"http://github.com\">GitHub</a></h3>", markdown

0 comments on commit 834d039

Please sign in to comment.