mirror of
https://github.com/status-im/markdown.git
synced 2025-02-24 00:58:22 +00:00
test: add nofollow ref for non internal links only
This commit is contained in:
parent
93484b1424
commit
c9977f0c0b
@ -424,7 +424,10 @@ func TestInlineLink(t *testing.T) {
|
|||||||
func TestNofollowLink(t *testing.T) {
|
func TestNofollowLink(t *testing.T) {
|
||||||
var tests = []string{
|
var tests = []string{
|
||||||
"[foo](/bar/)\n",
|
"[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)
|
doTestsInlineParam(t, tests, 0, HTML_SAFELINK|HTML_NOFOLLOW_LINKS)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user