From d18b67ae0afd61dae240896eae1785f00709aa31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vytautas=20=C5=A0altenis?= Date: Sat, 12 Dec 2015 19:18:59 +0200 Subject: [PATCH] Add more tests for emphasised text Including EXTENSION_NO_INTRA_EMPHASIS. These nail down a fix for #178 that was a side effect of cc3cc10. --- inline_test.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/inline_test.go b/inline_test.go index 1806669..3ae2561 100644 --- a/inline_test.go +++ b/inline_test.go @@ -155,10 +155,35 @@ func TestEmphasis(t *testing.T) { "*What is A\\* algorithm?*\n", "

What is A* algorithm?

\n", + + "some para_graph with _emphasised_ text.\n", + "

some para_graph with emphasised text.

\n", + + "some paragraph with _emphasised_ te_xt.\n", + "

some paragraph with emphasised te_xt.

\n", + + "some paragraph with t_wo bi_ts of _emphasised_ text.\n", + "

some paragraph with two bits of emphasised text.

\n", + + "un*frigging*believable\n", + "

unfriggingbelievable

\n", } doTestsInline(t, tests) } +func TestNoIntraEmphasis(t *testing.T) { + tests := []string{ + "some para_graph with _emphasised_ text.\n", + "

some para_graph with emphasised text.

\n", + + "un*frigging*believable\n", + "

un*frigging*believable

\n", + } + doTestsInlineParam(t, tests, Options{ + Extensions: EXTENSION_NO_INTRA_EMPHASIS}, + 0, HtmlRendererParameters{}) +} + func TestReferenceOverride(t *testing.T) { var tests = []string{ "test [ref1][]\n",