fix: get custom emoji id from title attribute (#1871)

zio/stable
Vjacheslav Trushkin 2023-03-08 22:19:53 +02:00 committed by GitHub
parent c76e8e8f5e
commit fa3cfd6059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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
}