So why not use prettier? Or use a more primitive remark for parsing. You only need to deal with alignment issues. There is no need to recreate the wheels of the markdown parser.