From fdda8b88b066268f49578f185ba73bb8263b9e5a Mon Sep 17 00:00:00 2001 From: KenjiTakahashi Date: Wed, 24 Dec 2014 22:05:29 +0100 Subject: [PATCH] add tests for emphasis with links --- inline_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/inline_test.go b/inline_test.go index 7ad3f0d..e95eb97 100644 --- a/inline_test.go +++ b/inline_test.go @@ -239,6 +239,23 @@ func TestEmphasisMix(t *testing.T) { doTestsInline(t, tests) } +func TestEmphasisLink(t *testing.T) { + var tests = []string{ + "[first](before) *text[second] (inside)text* [third](after)\n", + "

first textsecondtext third

\n", + + "*incomplete [link] definition*\n", + "

incomplete [link] definition

\n", + + "*it's [emphasis*] (not link)\n", + "

it's [emphasis] (not link)

\n", + + "*it's [emphasis*] and *[asterisk]\n", + "

it's [emphasis] and *[asterisk]

\n", + } + doTestsInline(t, tests) +} + func TestStrikeThrough(t *testing.T) { var tests = []string{ "nothing inline\n",