Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions spec/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@
html = "<p>This is a paragraph</p>\n<p>This is a<br />\nline break.</p>\n<div>\n<p>test</p>\n</div>"
RedCloth.new(input).to_html.should == html
end

it "should not add spurious li tags to the end of markup" do
input = "* one\n* two\n* three \n\n"
failing_input = "* one\n* two\n* three \n\n\n"
RedCloth.new(input).to_html.should_not match /<li>$/
RedCloth.new(failing_input).to_html.should_not match /<li>$/
end

if RUBY_VERSION > "1.9.0"
it "should preserve character encoding" do
Expand Down