update masked link regex

This commit is contained in:
Cap LaBuff 2026-07-11 19:03:58 +02:00 committed by GitHub
parent 31de8a5b06
commit a2a49e2a30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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])))
);