Loading tools/check.py +7 −3 Original line number Diff line number Diff line Loading @@ -362,9 +362,10 @@ class MarkdownValidator(object): # Validate local html links have matching md file return self._validate_one_html_link(link_node, check_text=check_text) elif not re.match(r"^((https?|ftp)://.+)", dest, re.IGNORECASE)\ elif not re.match(r"^((https?|ftp)://.+)|mailto:", dest, re.IGNORECASE)\ and not re.match(r"^#.*", dest): # If not web URL, and not anchor on same page, then # If not web or email URL, and not anchor on same page, then # verify that local file exists dest_path = os.path.join(self.lesson_dir, dest) dest_path = dest_path.split("#")[0] # Split anchor from filename Loading Loading @@ -505,6 +506,8 @@ class TopicPageValidator(MarkdownValidator): class MotivationPageValidator(MarkdownValidator): """Validate motivation.md""" WARN_ON_EXTRA_HEADINGS = False DOC_HEADERS = {"layout": vh.is_str, "title": vh.is_str, "subtitle": vh.is_str} Loading Loading @@ -537,6 +540,7 @@ class ReferencePageValidator(MarkdownValidator): That syntax isn't supported by the CommonMark parser, so we identify terms manually.""" glossary_keyword = glossary_entry[0] if len(glossary_entry) < 2: logging.error( "In {0}: " Loading Loading
tools/check.py +7 −3 Original line number Diff line number Diff line Loading @@ -362,9 +362,10 @@ class MarkdownValidator(object): # Validate local html links have matching md file return self._validate_one_html_link(link_node, check_text=check_text) elif not re.match(r"^((https?|ftp)://.+)", dest, re.IGNORECASE)\ elif not re.match(r"^((https?|ftp)://.+)|mailto:", dest, re.IGNORECASE)\ and not re.match(r"^#.*", dest): # If not web URL, and not anchor on same page, then # If not web or email URL, and not anchor on same page, then # verify that local file exists dest_path = os.path.join(self.lesson_dir, dest) dest_path = dest_path.split("#")[0] # Split anchor from filename Loading Loading @@ -505,6 +506,8 @@ class TopicPageValidator(MarkdownValidator): class MotivationPageValidator(MarkdownValidator): """Validate motivation.md""" WARN_ON_EXTRA_HEADINGS = False DOC_HEADERS = {"layout": vh.is_str, "title": vh.is_str, "subtitle": vh.is_str} Loading Loading @@ -537,6 +540,7 @@ class ReferencePageValidator(MarkdownValidator): That syntax isn't supported by the CommonMark parser, so we identify terms manually.""" glossary_keyword = glossary_entry[0] if len(glossary_entry) < 2: logging.error( "In {0}: " Loading