This is pretty cool! Could you compare your approach to the one taken in Majsdown?
https://github.com/vittorioromeo/majsdown