Add test for stripping just newlines from code blocks.

Ref #3275.
This commit is contained in:
Parker Moore 2015-01-09 23:51:34 -08:00
parent b92274b101
commit cae9d96cc4
1 changed files with 15 additions and 0 deletions

View File

@ -174,6 +174,21 @@ CONTENT
end end
end end
context "post content has highlight tag with preceding spaces" do
setup do
fill_post <<-EOS
[,1] [,2]
[1,] FALSE TRUE
[2,] FALSE TRUE
EOS
end
should "only strip the preceding newlines" do
assert_match %{<pre><code class=\"language-text\" data-lang=\"text\"> [,1] [,2]}, @result
end
end
context "simple post with markdown and pre tags" do context "simple post with markdown and pre tags" do
setup do setup do
@content = <<CONTENT @content = <<CONTENT