From d1e5f418b6ef481d55c1ca768b3c2af6e65a28a2 Mon Sep 17 00:00:00 2001 From: Jacob P <81419612+CanePlayz@users.noreply.github.com> Date: Mon, 30 Jan 2023 02:50:47 +0100 Subject: [PATCH] Update emoji parser to account for miscellaneous characters that are not emojis (#993) Closes #923 --- DiscordChatExporter.Core/Markdown/Parsing/MarkdownParser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DiscordChatExporter.Core/Markdown/Parsing/MarkdownParser.cs b/DiscordChatExporter.Core/Markdown/Parsing/MarkdownParser.cs index 9cdab34..610aa89 100644 --- a/DiscordChatExporter.Core/Markdown/Parsing/MarkdownParser.cs +++ b/DiscordChatExporter.Core/Markdown/Parsing/MarkdownParser.cs @@ -160,7 +160,7 @@ internal static partial class MarkdownParser // ... or digit followed by enclosing mark // (this does not match all emoji in Discord but it's reasonably accurate enough) private static readonly IMatcher StandardEmojiNodeMatcher = new RegexMatcher( - new Regex("((?:[\\uD83C][\\uDDE6-\\uDDFF]){2}|[\\u2600-\\u26FF]|\\p{Cs}{2}|\\d\\p{Me})", DefaultRegexOptions), + new Regex("((?:[\\uD83C][\\uDDE6-\\uDDFF]){2}|[\\u2600-\\u2604\\u260E\\u2611\\u2614-\\u2615\\u2618\\u261D\\u2620\\u2622-\\u2623\\u2626\\u262A\\u262E-\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F-\\u2660\\u2663\\u2665-\\u2666\\u2668\\u267B\\u267E-\\u267F\\u2692-\\u2697\\u2699\\u269B-\\u269C\\u26A0-\\u26A1\\u26A7\\u26AA-\\u26AB\\u26B0-\\u26B1\\u26BD-\\u26BE\\u26C4-\\u26C5\\u26C8\\u26CE-\\u26CF\\u26D1\\u26D3-\\u26D4\\u26E9-\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD]|\\p{Cs}{2}|\\d\\p{Me})", DefaultRegexOptions), (_, m) => new EmojiNode(m.Groups[1].Value) );