Only display http(s) URLs as links in HTML export (#1568)

This commit is contained in:
Cap LaBuff
2026-07-14 11:09:42 +02:00
committed by GitHub
parent 31de8a5b06
commit 0358045c94
@@ -264,7 +264,7 @@ internal static partial class MarkdownParser
private static readonly IMatcher<MarkdownContext, MarkdownNode> MaskedLinkNodeMatcher =
new RegexMatcher<MarkdownContext, MarkdownNode>(
// Capture [title](link)
new Regex(@"\[(.+?)\]\((.+?)\)", DefaultRegexOptions),
new Regex(@"\[(.+?)\]\((https?://\S*[^\.,:;""'\s])\)", DefaultRegexOptions),
(c, s, m) => new LinkNode(m.Groups[2].Value, Parse(c, s.Relocate(m.Groups[1])))
);