From 3f5f62585c07b107e1baf4ad5597bfa4c8ab7463 Mon Sep 17 00:00:00 2001 From: Alexey Golub Date: Thu, 28 Jun 2018 00:29:47 +0300 Subject: [PATCH] Make emojis larger if they are the only thing in content --- .../Services/ExportService.TemplateModel.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DiscordChatExporter.Core/Services/ExportService.TemplateModel.cs b/DiscordChatExporter.Core/Services/ExportService.TemplateModel.cs index b5920c33..c3412673 100644 --- a/DiscordChatExporter.Core/Services/ExportService.TemplateModel.cs +++ b/DiscordChatExporter.Core/Services/ExportService.TemplateModel.cs @@ -221,8 +221,10 @@ namespace DiscordChatExporter.Core.Services } // Custom emojis (<:name:id>) + var isJumboable = Regex.Replace(content, "<(:.*?:)(\\d*)>", "").IsBlank(); + var emojiClass = isJumboable ? "emoji emoji--large" : "emoji"; content = Regex.Replace(content, "<(:.*?:)(\\d*)>", - ""); + $""); return content; }