From cc734930c646b1db1c51194f6399e0abf30b2c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denilson=20Figueiredo=20de=20S=C3=A1?= Date: Fri, 13 Jun 2014 03:31:38 -0300 Subject: [PATCH 1/2] Making `highlight` behave more like redcarpet See issue 2510 for details. --- lib/jekyll/tags/highlight.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/tags/highlight.rb b/lib/jekyll/tags/highlight.rb index 29a6ea0a..f88cfc9d 100644 --- a/lib/jekyll/tags/highlight.rb +++ b/lib/jekyll/tags/highlight.rb @@ -83,7 +83,7 @@ eos def add_code_tag(code) # Add nested tags to code blocks - code = code.sub(/
\n*/,'
')
+        code = code.sub(/
\n*/,'
')
         code = code.sub(/\n*<\/pre>/,"
") code.strip end From b42e29c5a789dd5ab94c3ec5979776c01509570b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denilson=20S=C3=A1?= Date: Fri, 13 Jun 2014 03:50:02 -0300 Subject: [PATCH 2/2] Fixing tests. --- test/test_tags.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_tags.rb b/test/test_tags.rb index 7f2dd4d5..f34030e0 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -91,11 +91,11 @@ CONTENT end should "render markdown with pygments" do - assert_match %{
test
}, @result + assert_match %{
test
}, @result end should "render markdown with pygments with line numbers" do - assert_match %{
1 test
}, @result + assert_match %{
1 test
}, @result end end @@ -105,7 +105,7 @@ CONTENT end should "not embed the file" do - assert_match %{
./jekyll.gemspec
}, @result + assert_match %{
./jekyll.gemspec
}, @result end end @@ -115,7 +115,7 @@ CONTENT end should "render markdown with pygments line handling" do - assert_match %{
Æ
}, @result + assert_match %{
Æ
}, @result end end