diff --git a/htmltest/check-link.go b/htmltest/check-link.go
index 5f89f15..9a81ef2 100644
--- a/htmltest/check-link.go
+++ b/htmltest/check-link.go
@@ -277,11 +277,9 @@ func (hT *HTMLTest) checkInternal(ref *htmldoc.Reference) {
return
}
- // Solve #168
urlStr := ref.URLString()
- // Does this internal url match a internal url ignore rule?
- if hT.opts.isInternalURLIgnored(urlStr) {
+ if hT.opts.isInternalURLIgnored(urlStr) || hT.opts.isURLIgnored(urlStr) {
return
}
diff --git a/htmltest/check-link_test.go b/htmltest/check-link_test.go
index bc468e9..16f6e04 100644
--- a/htmltest/check-link_test.go
+++ b/htmltest/check-link_test.go
@@ -319,6 +319,15 @@ func TestAnchorInternalBrokenIgnore(t *testing.T) {
tExpectIssueCount(t, hT, 0)
}
+func TestAnchorInternalBrokenIgnoreUrl(t *testing.T) {
+ // ignores links in IgnoreURLs
+ hT := tTestFileOpts("fixtures/links/brokenLinkInternal.html",
+ map[string]interface{}{
+ "IgnoreURLs": []interface{}{"no\\w+.html"},
+ })
+ tExpectIssueCount(t, hT, 0)
+}
+
func TestAnchorInternalRelativeLinksBase(t *testing.T) {
// passes for relative links with a base
hT := tTestFile("fixtures/links/relativeLinksWithBase.html")