test/makeup/markup_test.rb in makeup-0.2.0 vs test/makeup/markup_test.rb in makeup-0.3.0

- old
+ new

@@ -61,9 +61,37 @@ MD assert_equal 2, html.scan(/common-lisp/).length end end + + describe "#render" do + it "should detect end of code blocks properly" do + html = @renderer.render("file.md", <<-MD) +# This stuff + +```ruby +class Hello + def say + puts "hallo" + end +end +```hidden-charaters + +# And this stuff + +```ruby +class Bonjour + def say + puts "bonjour" + end +end +``` + MD + + assert_equal 2, html.scan(/rb/).length + end + end describe "#highlight_code_blocks" do it "does not touch non-markdown files" do content = "```cl\n(yup)\n```" highlighted = @renderer.highlight_code_blocks("file.rst", content)