Skip to content

Commit

Permalink
v0.11.2: Fix link checker known broken absolute links
Browse files Browse the repository at this point in the history
  • Loading branch information
mDuo13 committed May 27, 2020
1 parent e308848 commit 1683c0a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions dactyl/dactyl_link_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ def check_remote_url(endpoint, in_file, hreftype=TYPE_LINK):
(hreftype, endpoint, in_file))
return (1, False)

if endpoint in config["known_broken_links"]:
logger.warning("Skipping known broken %s '%s' in %s" %
(hreftype, endpoint, in_file))
return (0, False)

logger.info("Testing remote %s '%s'" % (hreftype, endpoint))
try:
code = requests.head(endpoint, timeout=TIMEOUT_SECS).status_code
Expand Down Expand Up @@ -96,6 +91,11 @@ def check_href(endpoint, in_file, dirpath, top_dir, offline, hreftype=TYPE_LINK,
logger.warning("Empty %s in %s" % (hreftype,in_file))
return (1, False)

if endpoint in config["known_broken_links"]:
logger.warning("Skipping known broken %s '%s' in %s" %
(hreftype, endpoint, in_file))
return (0, False)

if endpoint == "#":
if hreftype == TYPE_IMAGE:
logger.warning("Invalid image URL: '#' in %s" % in_file)
Expand Down
2 changes: 1 addition & 1 deletion dactyl/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.11.1'
__version__ = '0.11.2'
4 changes: 4 additions & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v0.11.2 Release Notes

This release fixes a bug where the link checker ignored "known broken links" when checking links with absolute paths. (Prior to v0.11.0, the link checker wasn't capable of checking these links at all, so it skipped them regardless of whether they were marked as known broken links.)

# v0.11.1 Release Notes

This release introduces a simple HTTP server to aid development of sites that use absolute paths in links, and to work around some issues with absolute paths in PDF generation.
Expand Down

0 comments on commit 1683c0a

Please sign in to comment.