Implementing custom Markdown parser with the MD Library

Sidenote: Handling a tag with and without attributes by the same code should be as easy as swapping splits

What worries me, is generating of the HTML where it should not technically be generated.

I am not sure it would work properly with nested tags, although it seems it would, still it looks like a kludge. Md.Parser supports attaching a listener, which might modify the result, and we should at least re-pass it to the underlying generate/2. Also, it’d fail on creating deferred links ([foo][1] followed by [1] link,) and lose the context in general, when not surrounded by \n\n.

md is a streaming parser, unlike [H]EEx, which makes it less trivial to interoperate with other engines.

Anyway, I will think about how can it be done without leaving AST representation and come back to you.