It could be an option to change to [mistune](https://github.com/lepture/mistune) - it is mentioned in the flask-mdeditor page as a good rendering option. There seems to be really good [documentation](https://mistune.lepture.com/en/latest/guide.html)