Commit ecc98d28 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Test links

parent 95c563ff
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -354,7 +354,7 @@ 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
					for lnk in links:
+1 −1
Original line number Diff line number Diff line
@@ -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)