From 72b65d94dffd23ecd75e206d0b7dfc5ac6b4f2a0 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Sun, 22 May 2011 17:33:16 +0200 Subject: [PATCH] Only check anchors in HTML pages. --- linkcheck/checker/urlbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linkcheck/checker/urlbase.py b/linkcheck/checker/urlbase.py index 942d46ad..e126b4b5 100644 --- a/linkcheck/checker/urlbase.py +++ b/linkcheck/checker/urlbase.py @@ -629,7 +629,7 @@ class UrlBase (object): A warning is logged and True is returned if the anchor is not found. """ if not (self.anchor and self.aggregate.config["anchors"] and - self.valid and self.is_parseable()): + self.valid and self.is_html()): return log.debug(LOG_CHECK, "checking anchor %r in %s", self.anchor, self.anchors) if any(x for x in self.anchors if x[0] == self.anchor):