pull down to refresh
They don’t say it anywhere but I suppose they’re turning each HTML node into a universal tree and then convert that tree into Markdown (HAST -> MDAST)[1].
That’s what we’ve been doing!
Instead of HTML nodes we’re mapping Lexical rich text nodes into Markdown (and viceversa).
edit: but there are many other methods to achieve this conversion, so I don’t know!
ASTs: Abstract Syntax Tree; H for HTML and MD for Markdown ↩
reply
@sox, isn’t this what you’ve been doing?
Convert HTML to markdown