Loading generateSpecWebSite/markdownTools.py +6 −3 Original line number Diff line number Diff line Loading @@ -353,9 +353,12 @@ class Document: # Replace the markdown links for clause in self.clauses: for i, line in enumerate(clause.lines): if (links := markdownLink.findall(line.text)): if not line.text.strip().startswith('![') and (links := markdownLink.findall(line.text)): # Replace the old link targets with converted # (lower case) versions that point to the output files printDebug(f'Found Markdown links in clause "{clause.title}": {links}') # Remove duplicate matches in links list links = list(set(links)) for lnk in links: _lnk =lnk.casefold() if _lnk in linkTargets: Loading generateSpecWebSite/regexMatches.py +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ matchHtmlAnchorLink = re.compile(r'<a\s+name="([^"]*)">[^<]*</a>', re.IGNORECASE matchHtmlLink = re.compile(r'<a\s+href="([^"\']*)">[^<]*</a>', re.IGNORECASE) matchHtmlTag = re.compile(r'<[^>]*>', re.IGNORECASE) MatchInlineFootnote = re.compile(r'\[\^([^\]]*)\]', re.IGNORECASE) markdownLink = re.compile(r'[^!]\[[^\]]*\]\((#[^)]*)\)', re.IGNORECASE) markdownLink = re.compile(r'\[(?:(?:\\\[)?(?:[^]]*)(?:\\\])?)\]\((#[^)]*)\)', re.IGNORECASE) matchCodefenceStart = re.compile(r'\s*```\s?.*', re.IGNORECASE) matchCodefenceEnd = re.compile(r'\s*```\s?', re.IGNORECASE) matchGridTable = re.compile(r'^\s*\+-.*\+\s$', re.IGNORECASE) Loading Loading
generateSpecWebSite/markdownTools.py +6 −3 Original line number Diff line number Diff line Loading @@ -353,9 +353,12 @@ class Document: # Replace the markdown links for clause in self.clauses: for i, line in enumerate(clause.lines): if (links := markdownLink.findall(line.text)): if not line.text.strip().startswith('![') and (links := markdownLink.findall(line.text)): # Replace the old link targets with converted # (lower case) versions that point to the output files printDebug(f'Found Markdown links in clause "{clause.title}": {links}') # Remove duplicate matches in links list links = list(set(links)) for lnk in links: _lnk =lnk.casefold() if _lnk in linkTargets: Loading
generateSpecWebSite/regexMatches.py +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ matchHtmlAnchorLink = re.compile(r'<a\s+name="([^"]*)">[^<]*</a>', re.IGNORECASE matchHtmlLink = re.compile(r'<a\s+href="([^"\']*)">[^<]*</a>', re.IGNORECASE) matchHtmlTag = re.compile(r'<[^>]*>', re.IGNORECASE) MatchInlineFootnote = re.compile(r'\[\^([^\]]*)\]', re.IGNORECASE) markdownLink = re.compile(r'[^!]\[[^\]]*\]\((#[^)]*)\)', re.IGNORECASE) markdownLink = re.compile(r'\[(?:(?:\\\[)?(?:[^]]*)(?:\\\])?)\]\((#[^)]*)\)', re.IGNORECASE) matchCodefenceStart = re.compile(r'\s*```\s?.*', re.IGNORECASE) matchCodefenceEnd = re.compile(r'\s*```\s?', re.IGNORECASE) matchGridTable = re.compile(r'^\s*\+-.*\+\s$', re.IGNORECASE) Loading