This was a fun challenge. Basically a black-box reverse engineer of a markdown to html compiler.
You should absolutely not use this for anything. There is no shortage of well done compiler/transpiler/parsers out there. After all, markdown was designed from the ground up to be compiled to HTML. This was just a learning experience. And I learned a ton.