I wonder why you implemented part of markdown, rather than using QTextDocument’s existing markdown support. Is something that you need missing?
I'm already using QTextDocument markdown support. Just QTextDocument markdown support doesn't include all the WYSIWYG functionalities.
Hmm I thought I had fixed this bug. I will investigate.