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.
pull/229/head
Vytautas Šaltenis 2015-12-12 19:18:59 +02:00
parent 3c4a488ada
commit d18b67ae0a
1 changed files with 25 additions and 0 deletions

View File

@ -155,10 +155,35 @@ func TestEmphasis(t *testing.T) {
"*What is A\\* algorithm?*\n",
"<p><em>What is A* algorithm?</em></p>\n",
"some para_graph with _emphasised_ text.\n",
"<p>some para_graph with <em>emphasised</em> text.</p>\n",
"some paragraph with _emphasised_ te_xt.\n",
"<p>some paragraph with <em>emphasised</em> te_xt.</p>\n",
"some paragraph with t_wo bi_ts of _emphasised_ text.\n",
"<p>some paragraph with t<em>wo bi</em>ts of <em>emphasised</em> text.</p>\n",
"un*frigging*believable\n",
"<p>un<em>frigging</em>believable</p>\n",
}
doTestsInline(t, tests)
}
func TestNoIntraEmphasis(t *testing.T) {
tests := []string{
"some para_graph with _emphasised_ text.\n",
"<p>some para_graph with <em>emphasised</em> text.</p>\n",
"un*frigging*believable\n",
"<p>un*frigging*believable</p>\n",
}
doTestsInlineParam(t, tests, Options{
Extensions: EXTENSION_NO_INTRA_EMPHASIS},
0, HtmlRendererParameters{})
}
func TestReferenceOverride(t *testing.T) {
var tests = []string{
"test [ref1][]\n",