From 642500a4ba3655243f0fe55ca20a81184f511931 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Wed, 24 Feb 2021 16:38:26 +0100 Subject: [PATCH] Added comments --- src/main/java/w2phtml/xhtml/content/TextParser.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/w2phtml/xhtml/content/TextParser.java b/src/main/java/w2phtml/xhtml/content/TextParser.java index 6e8e871..2696e99 100644 --- a/src/main/java/w2phtml/xhtml/content/TextParser.java +++ b/src/main/java/w2phtml/xhtml/content/TextParser.java @@ -1189,12 +1189,14 @@ public class TextParser extends Parser { // Check it's master page, pageNumber, Page break before - if we already set MP - throw it away // And make a note to pass this paragraph next time you'll meet it. if (inUnreakableElement() ) { + //No breaks possible return hnode; } Integer newPageNumber = null; newPageNumber = getPageNumber(style, newPageNumber); if (currentMasterPage == null && style != null) { + //Document wasn't started yet. hnode = startDocument(hnode, style, newPageNumber); hnode = docSep.processOutlineLevel(currentNode, hnode, pageNum); } else if (hasMasterPage(style) || hasBreakBefore(style) || breakBeforeNextNode) {