fix: don't parse rich content in display name (#449)
Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
This commit is contained in:
parent
9395b7031e
commit
7887629954
5 changed files with 47 additions and 35 deletions
|
@ -13,9 +13,12 @@ import AccountHoverWrapper from '~/components/account/AccountHoverWrapper.vue'
|
|||
*/
|
||||
export function contentToVNode(
|
||||
content: string,
|
||||
customEmojis: Record<string, Emoji> = {},
|
||||
{ emojis = {}, markdown = true }: {
|
||||
emojis?: Record<string, Emoji>
|
||||
markdown?: boolean
|
||||
} = {},
|
||||
): VNode {
|
||||
const tree = parseMastodonHTML(content, customEmojis)
|
||||
const tree = parseMastodonHTML(content, emojis, markdown)
|
||||
return h(Fragment, (tree.children as Node[]).map(n => treeToVNode(n)))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue