summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2019-10-14 17:59:16 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2019-11-05 16:40:18 +0200
commitd1c6f7e5a2e0ee6c50bbf0668e44200bd8469a09 (patch)
treebd35b5f802567cb06d65b09454f6ba3ecd712f7d /src/gui
parent524ab7b5357e66b935a42956ec365a511e62e5ed (diff)
QTextMarkdownWriter: preserve empty listsv5.14.0-beta3
You can save a "skeletal" document with list items to fill in later, the same as you can do in HTML or ODF format. Reading them back via QTextDocument::fromMarkdown() isn't always perfect though. Fixes: QTBUG-79217 Change-Id: Iacdb3e6792250ebdead05f314c9e3d00546eeb9f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qtextmarkdownwriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextmarkdownwriter.cpp b/src/gui/text/qtextmarkdownwriter.cpp
index 764c64aead..c9a63920c3 100644
--- a/src/gui/text/qtextmarkdownwriter.cpp
+++ b/src/gui/text/qtextmarkdownwriter.cpp
@@ -173,7 +173,8 @@ void QTextMarkdownWriter::writeFrame(const QTextFrame *frame)
if (lastWasList)
m_stream << Newline;
}
- int endingCol = writeBlock(block, !table, table && tableRow == 0, nextIsDifferent);
+ int endingCol = writeBlock(block, !table, table && tableRow == 0,
+ nextIsDifferent && !block.textList());
m_doubleNewlineWritten = false;
if (table) {
QTextTableCell cell = table->cellAt(block.position());