Skip to content

Commit

Permalink
fix: get custom emoji id from title attribute (#1871)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberalien authored Mar 8, 2023
1 parent c76e8e8 commit fa3cfd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composables/content-parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit fa3cfd6

Please sign in to comment.