diff --git a/test/test_tags.rb b/test/test_tags.rb index dd1db97b..b6402150 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -317,6 +317,27 @@ EOS end end + context "post content has highlight tag with linenumbers" do + setup do + create_post <<-EOS +--- +title: This is a test +--- + +This is not yet highlighted +{% highlight php linenos %} +test +{% endhighlight %} + +This should not be highlighted, right? +EOS + end + + should "should stop highlighting at boundary" do + assert_match "

This is not yet highlighted

\n\n
1
test\n
\n\n

This should not be highlighted, right?

", @result + end + end + context "post content has highlight tag with preceding spaces & Windows-style newlines" do setup do fill_post "\r\n\r\n\r\n [,1] [,2]"