1
0
mirror of https://github.com/danog/blackfriday.git synced 2024-11-26 20:14:43 +01:00

add tests for emphasis with links

This commit is contained in:
KenjiTakahashi 2014-12-24 22:05:29 +01:00
parent 48aaef5fbf
commit fdda8b88b0

View File

@ -239,6 +239,23 @@ func TestEmphasisMix(t *testing.T) {
doTestsInline(t, tests) doTestsInline(t, tests)
} }
func TestEmphasisLink(t *testing.T) {
var tests = []string{
"[first](before) *text[second] (inside)text* [third](after)\n",
"<p><a href=\"before\">first</a> <em>text<a href=\"inside\">second</a>text</em> <a href=\"after\">third</a></p>\n",
"*incomplete [link] definition*\n",
"<p><em>incomplete [link] definition</em></p>\n",
"*it's [emphasis*] (not link)\n",
"<p><em>it's [emphasis</em>] (not link)</p>\n",
"*it's [emphasis*] and *[asterisk]\n",
"<p><em>it's [emphasis</em>] and *[asterisk]</p>\n",
}
doTestsInline(t, tests)
}
func TestStrikeThrough(t *testing.T) { func TestStrikeThrough(t *testing.T) {
var tests = []string{ var tests = []string{
"nothing inline\n", "nothing inline\n",