forked from Mirrors/elk
fix: get custom emoji id from title attribute (#1871)
This commit is contained in:
parent
c76e8e8f5e
commit
fa3cfd6059
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue