mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-22 14:07:07 +00:00
Fix incorrect standard emoji rendering in plaintext
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
namespace DiscordChatExporter.Core.Markdown
|
using Tyrrrz.Extensions;
|
||||||
|
|
||||||
|
namespace DiscordChatExporter.Core.Markdown
|
||||||
{
|
{
|
||||||
public class EmojiNode : Node
|
public class EmojiNode : Node
|
||||||
{
|
{
|
||||||
@@ -8,6 +10,8 @@
|
|||||||
|
|
||||||
public bool IsAnimated { get; }
|
public bool IsAnimated { get; }
|
||||||
|
|
||||||
|
public bool IsCustomEmoji => Id.IsNotBlank();
|
||||||
|
|
||||||
public EmojiNode(string lexeme, string id, string name, bool isAnimated)
|
public EmojiNode(string lexeme, string id, string name, bool isAnimated)
|
||||||
: base(lexeme)
|
: base(lexeme)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ namespace DiscordChatExporter.Core.Services
|
|||||||
|
|
||||||
else if (node is EmojiNode emojiNode)
|
else if (node is EmojiNode emojiNode)
|
||||||
{
|
{
|
||||||
buffer.Append($":{emojiNode.Name}:");
|
buffer.Append(emojiNode.IsCustomEmoji ? $":{emojiNode.Name}:" : node.Lexeme);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user