refactor: html parsing

This commit is contained in:
Anthony Fu 2023-01-07 10:31:48 +01:00
parent d76e4bfaa5
commit 6944a74653
8 changed files with 152 additions and 124 deletions

View file

@ -67,7 +67,7 @@ describe('html-parse', () => {
})
async function render(input: string, emojis?: Record<string, Emoji>) {
const tree = parseMastodonHTML(input, emojis)
const tree = parseMastodonHTML(input, { emojis })
const html = await renderTree(tree)
let formatted = ''
const serializedText = treeToText(tree).trim()