summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocumentfragment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qtextdocumentfragment.cpp')
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index 042b1d01c2..0c8860e98e 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -545,8 +545,13 @@ void QTextHtmlImporter::import()
}
if (currentNode->isBlock()) {
- if (processBlockNode() == ContinueWithNextNode)
+ QTextHtmlImporter::ProcessNodeResult result = processBlockNode();
+ if (result == ContinueWithNextNode) {
continue;
+ } else if (result == ContinueWithNextSibling) {
+ currentNodeIdx += currentNode->children.size();
+ continue;
+ }
}
if (currentNode->charFormat.isAnchor() && !currentNode->charFormat.anchorName().isEmpty()) {
@@ -1157,7 +1162,7 @@ QTextHtmlImporter::ProcessNodeResult QTextHtmlImporter::processBlockNode()
if (currentNode->isEmptyParagraph) {
hasBlock = false;
- return ContinueWithNextNode;
+ return ContinueWithNextSibling;
}
hasBlock = true;