Skip to content

Commit

Permalink
Verify that tables with leading and trailing pipes work.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfstr committed May 28, 2013
1 parent d3fc000 commit 755b5de
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/rdiscount_test.rb
Expand Up @@ -177,5 +177,14 @@ def test_that_style_tag_is_not_filtered_by_default
rd = RDiscount.new("Hello<style>p { margin: 5px; }</style>")
assert_equal "<p>Hello<style>p { margin: 5px; }</style></p>\n", rd.to_html
end

def test_that_tables_can_have_leading_and_trailing_pipes
rd = RDiscount.new(<<EOS)
| A | B |
|---|---|
| C | D |
EOS
assert_equal "<p>| A | B |\n|---|---|\n| C | D |</p>\n", rd.to_html
end

end

0 comments on commit 755b5de

Please sign in to comment.