From fa3cfd6059f2bdd42bc5d349ac225c29c6f666de Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Wed, 8 Mar 2023 22:19:53 +0200 Subject: [PATCH] fix: get custom emoji id from title attribute (#1871) --- composables/content-parse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composables/content-parse.ts b/composables/content-parse.ts index 06caa50b..6e2d3383 100644 --- a/composables/content-parse.ts +++ b/composables/content-parse.ts @@ -219,7 +219,7 @@ export function treeToText(input: Node): string { if (input.name === 'img' || input.name === 'picture') { if (input.attributes.class?.includes('custom-emoji')) - return `:${input.attributes['data-emoji-id']}:` + return `:${input.attributes['data-emoji-id'] || input.attributes.title}:` if (input.attributes.class?.includes('iconify-emoji')) return input.attributes.alt }