From ef2a2b02dc226565748b2546054149c1349a4dc2 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Fri, 11 Apr 2014 19:54:55 -0700 Subject: [PATCH] Add failing test for an issue introduced by PR #56. The issue is that when there are more than 1 fenced code blocks with a blank line before and after, the parser introduces a single extra new line to all the fenced code blocks except the last one. --- block_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/block_test.go b/block_test.go index 6692ce1..c320edd 100644 --- a/block_test.go +++ b/block_test.go @@ -711,6 +711,12 @@ func TestFencedCodeBlock(t *testing.T) { "`", "

`

\n", + + "Bla bla\n\n``` oz\ncode blocks breakup paragraphs\n```\n\nBla Bla\n\n``` oz\nmultiple code blocks work okay\n```\n\nBla Bla\n", + "

Bla bla

\n\n
code blocks breakup paragraphs\n
\n\n

Bla Bla

\n\n
multiple code blocks work okay\n
\n\n

Bla Bla

\n", + + "Some text before a fenced code block\n``` oz\ncode blocks breakup paragraphs\n```\nSome text in between\n``` oz\nmultiple code blocks work okay\n```\nAnd some text after a fenced code block", + "

Some text before a fenced code block

\n\n
code blocks breakup paragraphs\n
\n\n

Some text in between

\n\n
multiple code blocks work okay\n
\n\n

And some text after a fenced code block

\n", } doTestsBlock(t, tests, EXTENSION_FENCED_CODE) }