From cae9d96cc4ba43ae188a033f247e3dc58fcbf499 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 9 Jan 2015 23:51:34 -0800 Subject: [PATCH] Add test for stripping just newlines from code blocks. Ref #3275. --- test/test_tags.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/test_tags.rb b/test/test_tags.rb index bc4b48cd..eb547750 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -174,6 +174,21 @@ CONTENT 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 %{
     [,1] [,2]}, @result
+    end
+  end
+
   context "simple post with markdown and pre tags" do
     setup do
       @content = <