Skip to content

Commit

Permalink
Ignore only web links
Browse files Browse the repository at this point in the history
We want to find cases where we're linking to files if we didn't get the extension right either.
  • Loading branch information
Ghostkeeper committed Dec 7, 2019
1 parent e87cb1b commit 447c8a5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ def test_articles(self):
with open(filename) as f:
contents = f.read()
for link in find_links.findall(contents):
if not link.endswith(".md"):
continue # Only find articles.
if link.startswith("https://"):
if link.startswith("https://") or link.startswith("http://"):
continue # Don't find articles on the internet either.
article_path = os.path.join(os.path.dirname(filename), link)
assert os.path.exists(article_path), "Article {article_path} refers to article {path}, which doesn't exist.".format(article_path=filename, path=article_path)
Expand Down

0 comments on commit 447c8a5

Please sign in to comment.