Make emojis larger if they are the only thing in content

pull/66/head
Alexey Golub 6 years ago
parent 49f39c7097
commit 3f5f62585c

@ -221,8 +221,10 @@ namespace DiscordChatExporter.Core.Services
}
// Custom emojis (<:name:id>)
var isJumboable = Regex.Replace(content, "&lt;(:.*?:)(\\d*)&gt;", "").IsBlank();
var emojiClass = isJumboable ? "emoji emoji--large" : "emoji";
content = Regex.Replace(content, "&lt;(:.*?:)(\\d*)&gt;",
"<img class=\"emoji\" title=\"$1\" src=\"https://cdn.discordapp.com/emojis/$2.png\" />");
$"<img class=\"{emojiClass}\" title=\"$1\" src=\"https://cdn.discordapp.com/emojis/$2.png\" />");
return content;
}

Loading…
Cancel
Save