From 040dd7fe26bfa34aae19e2db698ff0d69346ed56 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 26 Apr 2019 07:40:34 +0200 Subject: Markdown: fix several issues with lists and continuations Importer fixes: - the first list item after a heading doesn't keep the heading font - the first text fragment after a bullet is the bullet text, not a separate paragraph - detect continuation lines and append to the list item text - detect continuation paragraphs and indent them properly - indent nested list items properly - add a test for QTextMarkdownImporter Writer fixes: - after bullet items, continuation lines and paragraphs are indented - indentation of continuations isn't affected by checkboxes - add extra newlines between list items in "loose" lists - avoid writing triple newlines - enhance the test for QTextMarkdownWriter Change-Id: Ib1dda514832f6dc0cdad177aa9a423a7038ac8c6 Reviewed-by: Gatis Paeglis --- src/gui/text/qtextmarkdownimporter_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/text/qtextmarkdownimporter_p.h') diff --git a/src/gui/text/qtextmarkdownimporter_p.h b/src/gui/text/qtextmarkdownimporter_p.h index dee24a8e22..8ab119d051 100644 --- a/src/gui/text/qtextmarkdownimporter_p.h +++ b/src/gui/text/qtextmarkdownimporter_p.h @@ -116,6 +116,8 @@ private: Features m_features; int m_blockType = 0; bool m_emptyList = false; // true when the last thing we did was insertList + bool m_listItem = false; + bool m_emptyListItem = false; bool m_imageSpan = false; }; -- cgit v1.2.3