mirror of
https://github.com/russross/blackfriday.git
synced 2024-03-22 13:40:34 +08:00
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
.
This commit is contained in:
parent
3c4a488ada
commit
d18b67ae0a
|
@ -155,10 +155,35 @@ func TestEmphasis(t *testing.T) {
|
||||||
|
|
||||||
"*What is A\\* algorithm?*\n",
|
"*What is A\\* algorithm?*\n",
|
||||||
"<p><em>What is A* algorithm?</em></p>\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)
|
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) {
|
func TestReferenceOverride(t *testing.T) {
|
||||||
var tests = []string{
|
var tests = []string{
|
||||||
"test [ref1][]\n",
|
"test [ref1][]\n",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user