Revert "Disable AnchorCheck plugin"

This reverts commit 0356524369.
This commit is contained in:
Chris Mayo 2022-10-03 19:33:05 +01:00
parent 033dcf89f9
commit 54bcefd7d7
2 changed files with 0 additions and 12 deletions

View file

@ -26,16 +26,8 @@ from ..htmlutil import linkparse
class AnchorCheck(_ContentPlugin):
"""Checks validity of HTML anchors."""
def __init__(self, config):
"""Initialize plugin."""
super().__init__(config)
log.warn(
LOG_PLUGIN, _("Anchor check plugin is broken. Fixes welcome.")
)
def applies_to(self, url_data):
"""Check for HTML anchor existence."""
return False # XXX Plugin disabled
return url_data.is_html() and url_data.anchor
def check(self, url_data):

View file

@ -16,8 +16,6 @@
"""
Test html anchor parsing and checking.
"""
import pytest
from . import LinkCheckTest
from .httpserver import HttpServerTest
@ -27,7 +25,6 @@ class TestAnchor(LinkCheckTest):
Test anchor checking of HTML pages.
"""
@pytest.mark.xfail(strict=True)
def test_anchor(self):
confargs = {"enabledplugins": ["AnchorCheck"]}
url = "file://%(curdir)s/%(datadir)s/anchor.html" % self.get_attrs()
@ -49,7 +46,6 @@ class TestHttpAnchor(HttpServerTest):
Test checking of HTML pages containing links to anchors served over http.
"""
@pytest.mark.xfail(strict=True)
def test_anchor_html(self):
confargs = dict(enabledplugins=["AnchorCheck"], recursionlevel=1)
self.file_test("http_anchor.html", confargs=confargs)