Alternate AST mode?
I’m inspired by how tiny this library is... I’d love to be able to use it to power something like https://www.npmjs.com/package/markdown-to-jsx.
Probably couldn't get that into 1kb. What about passing the resulting HTML into DOMParser?
I forked snarkdown to make it generate an AST instead of HTML.
https://www.npmjs.com/package/markdown-ast
I also forked snarkdown to make twitchdown (8kb minified) that you can pass an h/createElement function. Plugs right into (p)react (see https://bytes.nz/8jf749h https://gitlab.com/bytesnz/marss/blob/initial-developement/src/components/markdown.tsx#L59 for an example of it in use in a react component.