refactor: html parsing
This commit is contained in:
parent
d76e4bfaa5
commit
6944a74653
8 changed files with 152 additions and 124 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue