Skip to content

Commit

Permalink
fix: copy and paste custom-emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Mar 8, 2023
1 parent fa3cfd6 commit 09403a0
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'] || input.attributes.title}:`
return `:${input.attributes['data-emoji-id'] ?? input.attributes.title ?? input.attributes.alt?.slice(1, -1)}:`
if (input.attributes.class?.includes('iconify-emoji'))
return input.attributes.alt
}
Expand Down

0 comments on commit 09403a0

Please sign in to comment.