diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/htmldocvisitor.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 81d28eb..c0c22b8 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -2377,16 +2377,14 @@ void HtmlDocVisitor::forceEndParagraph(DocNode *n) DocPara *para = (DocPara*)n->parent(); int nodeIndex = para->children().findRef(n); nodeIndex--; - if (nodeIndex<0) return; // first node + if (nodeIndex<0) return; // first node in paragraph while (nodeIndex>=0 && isInvisibleNode(para->children().at(nodeIndex))) { nodeIndex--; } - if (nodeIndex>=0) - { - DocNode *n = para->children().at(nodeIndex); - if (mustBeOutsideParagraph(n)) return; - } + if (nodeIndex<0) return; // first visible node in paragraph + DocNode *n = para->children().at(nodeIndex); + if (mustBeOutsideParagraph(n)) return; // previous node already outside paragraph context nodeIndex--; bool styleOutsideParagraph=insideStyleChangeThatIsOutsideParagraph(para,nodeIndex); bool isFirst; |