Skip to content

Commit 13ee666

Browse files
committed
Ignore links with rel=dns-prefetch
Will close #40
1 parent 3794272 commit 13ee666

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

htmltest/check-link.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ func (hT *HTMLTest) checkLink(document *htmldoc.Document, node *html.Node) {
2828
document.State.FaviconPresent = true
2929
}
3030

31+
// Ignore if rel=dns-prefetch, see #40. If we have more cases like this a hashable type should be created and
32+
// checked against.
33+
if attrs["rel"] == "dns-prefetch" {
34+
return
35+
}
36+
3137
// Create reference
3238
ref := htmldoc.NewReference(document, node, attrs["href"])
3339

0 commit comments

Comments
 (0)