diff --git a/test/links.py b/test/links.py index 825d152a2..1acd05de1 100644 --- a/test/links.py +++ b/test/links.py @@ -32,7 +32,7 @@ def test_images(self): """ Test if the links to images are correct. """ - find_images = re.compile(r"!\[.*\]\((.+)\)") + find_images = re.compile(r"!\[.*\]\(([^\)]*)\)") for filename in self.all_articles(): with self.subTest(): with open(filename) as f: @@ -45,7 +45,7 @@ def test_articles(self): """ Test if the links to other articles are correct. """ - find_links = re.compile(r"\[.*\]\((.+)\)") + find_links = re.compile(r"\[.*\]\(([^\)]*)\)") for filename in self.all_articles(): with self.subTest(): with open(filename) as f: