Skip to content

Commit 3dbfc02

Browse files
committed
Merge pull request #239 from r-gaia-cs/core-fix-check-of-links
Avoid wrong error with links at index.md
2 parents 98fa0d2 + cce9c64 commit 3dbfc02

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tools/check.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,18 @@ class IndexPageValidator(MarkdownValidator):
475475

476476
def _partition_links(self):
477477
"""Check the text of every link in index.md"""
478-
check_text = self.ast.find_external_links()
479-
return check_text, []
478+
external_links = self.ast.find_external_links()
479+
480+
check_text = []
481+
no_check_text = []
482+
483+
for link in external_links:
484+
if '#' in link.destination:
485+
no_check_text.append(link)
486+
else:
487+
check_text.append(link)
488+
489+
return check_text, no_check_text
480490

481491
def _validate_intro_section(self):
482492
"""Validate the intro section

0 commit comments

Comments
 (0)