pull down to refresh

@sox, isn’t this what you’ve been doing?

Convert HTML to markdown

133 sats \ 0 replies \ @sox 5h

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!

  1. ASTs: Abstract Syntax Tree; H for HTML and MD for Markdown

reply