From 447c8a59ef329f0c02377e7f7845774fe128d770 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Sun, 8 Dec 2019 00:14:14 +0100 Subject: [PATCH] Ignore only web links We want to find cases where we're linking to files if we didn't get the extension right either. --- test/links.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/links.py b/test/links.py index 1acd05de1..53d84933e 100644 --- a/test/links.py +++ b/test/links.py @@ -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)