This allows support for markdown table display and <foo>

Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
Adam Treat 2024-06-28 11:36:34 -04:00 committed by AT
parent 6f52f602ef
commit f6f265f968

View File

@ -1157,7 +1157,9 @@ void replaceAndInsertMarkdown(int startIndex, int endIndex, QTextDocument *doc)
QTextDocumentFragment fragment(cursor);
const QString plainText = fragment.toPlainText();
cursor.removeSelectedText();
cursor.insertMarkdown(plainText, QTextDocument::MarkdownNoHTML);
QTextDocument::MarkdownFeatures features = static_cast<QTextDocument::MarkdownFeatures>(
QTextDocument::MarkdownNoHTML | QTextDocument::MarkdownDialectGitHub);
cursor.insertMarkdown(plainText, features);
cursor.block().setUserState(Markdown);
}