fix: insert space around custom emojis
This commit is contained in:
parent
6412127283
commit
ff0ad77676
3 changed files with 6 additions and 3 deletions
|
@ -120,7 +120,7 @@ export function treeToText(input: Node): string {
|
|||
|
||||
// add spaces around emoji to prevent parsing errors: 2 or more consecutive emojis will not be parsed
|
||||
if (input.name === 'img' && input.attributes.class?.includes('custom-emoji'))
|
||||
return `:${input.attributes['data-emoji-id']}:`
|
||||
return ` :${input.attributes['data-emoji-id']}: `
|
||||
|
||||
if (input.name === 'em-emoji')
|
||||
return `${input.attributes.native}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue