summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qtextmarkdownwriter/data/headingsAndLists.md
Commit message (Collapse)AuthorAgeFilesLines
* QTextMarkdownImporter: don't keep heading level on following list itemShawn Rutledge2019-05-241-0/+12
When reading a document like # heading - list item and then re-writing it, it turned into # heading - # list item because QTextCursor::insertList() simply calls QTextCursor::insertBlock(), thus inheriting block format from the previous block, without an opportunity to explicitly define the block format. So be more consistent: use QTextMarkdownImporter::insertBlock() for blocks inside list items too. Now it fully defines blockFormat first, then inserts the block, and then adds it to the current list only when the "paragraph" is actually the list item's text (but not when it's a continuation paragraph). Also, be prepared for applying and removing block markers to arbitrary blocks, just in case (they might be useful for block quotes, for example). Change-Id: I391820af9b65e75abce12abab45d2477c49c86ac Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>