mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-08-23 12:30:06 +02:00
Only display http(s) URLs as links in HTML export (#1568)
This commit is contained in:
@@ -264,7 +264,7 @@ internal static partial class MarkdownParser
|
|||||||
private static readonly IMatcher<MarkdownContext, MarkdownNode> MaskedLinkNodeMatcher =
|
private static readonly IMatcher<MarkdownContext, MarkdownNode> MaskedLinkNodeMatcher =
|
||||||
new RegexMatcher<MarkdownContext, MarkdownNode>(
|
new RegexMatcher<MarkdownContext, MarkdownNode>(
|
||||||
// Capture [title](link)
|
// 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])))
|
(c, s, m) => new LinkNode(m.Groups[2].Value, Parse(c, s.Relocate(m.Groups[1])))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user