Release 1.2 (in development)
+* PR#45: The linkcheck builder now checks ``#anchor``\ s for existence.
* PR#28: Added Hungarian translation.
* PR#35: Added Slovak translation.
.. confval:: linkcheck_anchors
- True or false, whether to check the existence of #anchor in links. Since
- this requires downloading the whole document, it's considerably slower
- when enabled. Default is ``True``.
+ True or false, whether to check the validity of ``#anchor``\ s in links.
+ Since this requires downloading the whole document, it's considerably slower
+ when enabled. Default is ``True``.
+ """Specialized HTML parser that looks for a specific anchor."""
def __init__(self, search_anchor):
if key in ('id', 'name') and value == self.search_anchor:
def check_anchor(f, hash):
"""Reads HTML data from a filelike object 'f' searching for anchor 'hash'.
- Returns True if anchor was found, False otherwise"""
+ Returns True if anchor was found, False otherwise.
parser = AnchorCheckParser(hash)
# Read file in chunks of 8192 bytes. If we find a matching anchor, we
- # break the loop early in hopes not to have to download the whole thing
+ # break the loop early in hopes not to have to download the whole thing.
while chunk and not parser.found:
# HTMLParser is usually pretty good with sloppy HTML, but it tends to
# choke on EOF. But we're done then anyway.