From 58c4ddd4312ed3590e02b837c785cef03554e530 Mon Sep 17 00:00:00 2001 From: neclepsio Date: Thu, 23 Apr 2015 10:49:08 +0200 Subject: [PATCH] Added test for backslash line break --- inline_test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/inline_test.go b/inline_test.go index e540b8a..4e67d5c 100644 --- a/inline_test.go +++ b/inline_test.go @@ -332,10 +332,34 @@ func TestLineBreak(t *testing.T) { "this line \ndoes not\n", "

this line\ndoes not

\n", + "this line\\\ndoes not\n", + "

this line\\\ndoes not

\n", + + "this line\\ \ndoes not\n", + "

this line\\\ndoes not

\n", + "this has an \nextra space\n", "

this has an
\nextra space

\n", } doTestsInline(t, tests) + + tests = []string{ + "this line \nhas a break\n", + "

this line
\nhas a break

\n", + + "this line \ndoes not\n", + "

this line\ndoes not

\n", + + "this line\\\nhas a break\n", + "

this line
\nhas a break

\n", + + "this line\\ \ndoes not\n", + "

this line\\\ndoes not

\n", + + "this has an \nextra space\n", + "

this has an
\nextra space

\n", + } + doTestsInlineParam(t, tests, EXTENSION_BACKSLASH_LINE_BREAK, 0, HtmlRendererParameters{}) } func TestInlineLink(t *testing.T) {