The best way is probably to generate the html instead of the md.
The best way is probably to generate the html instead of the md.