From e82ad2b9c614f0ad0ba9af3419624325ddc3c00d Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Sat, 5 Aug 2023 18:35:22 +0300 Subject: [PATCH] Add comment linking an issue that explains why the `EscapedSymbolTextNodeMatcher` is used --- DiscordChatExporter.Core/Markdown/Parsing/MarkdownParser.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/DiscordChatExporter.Core/Markdown/Parsing/MarkdownParser.cs b/DiscordChatExporter.Core/Markdown/Parsing/MarkdownParser.cs index ca1282db..cde22ce9 100644 --- a/DiscordChatExporter.Core/Markdown/Parsing/MarkdownParser.cs +++ b/DiscordChatExporter.Core/Markdown/Parsing/MarkdownParser.cs @@ -264,6 +264,7 @@ internal static partial class MarkdownParser private static readonly IMatcher EscapedSymbolTextNodeMatcher = new RegexMatcher( // Capture any "symbol/other" character or surrogate pair preceded by a backslash. // This escapes them from matching for emoji. + // https://github.com/Tyrrrz/DiscordChatExporter/issues/230 new Regex(@"\\(\p{So}|\p{Cs}{2})", DefaultRegexOptions), (_, m) => new TextNode(m.Groups[1].Value) );