Nice! I think that it would be great if this could take markdown as input, without having to convert to HTML first

Interesting. I will give it a try. By the way, why is converting to HTML first a problem for you?