fix: don't parse rich content in display name

closes #445
This commit is contained in:
三咲智子 2022-12-17 22:30:39 +08:00
parent 6392b82a93
commit 5be48b102f
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
4 changed files with 46 additions and 34 deletions

View file

@ -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)))
}