all repos — grayfriday @ c9977f0c0bc6d08e7537bffcf0d2dbd622fba98d

blackfriday fork with a few changes

test: add nofollow ref for non internal links only
gihnius gihnius@gmail.com
Fri, 21 Mar 2014 11:17:31 +0800
commit

c9977f0c0bc6d08e7537bffcf0d2dbd622fba98d

parent

93484b1424ae21ae8bef25778033d4a89bd4dba9

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M inline_test.goinline_test.go

@@ -424,7 +424,10 @@

func TestNofollowLink(t *testing.T) { var tests = []string{ "[foo](/bar/)\n", - "<p><a href=\"/bar/\" rel=\"nofollow\">foo</a></p>\n", + "<p><a href=\"/bar/\">foo</a></p>\n", + + "[foo](http://bar.com/foo/)\n", + "<p><a href=\"http://bar.com/foo/\" rel=\"nofollow\">foo</a></p>\n", } doTestsInlineParam(t, tests, 0, HTML_SAFELINK|HTML_NOFOLLOW_LINKS) }