From 27a088167069ad5b7c3f613f7b6e764c425465a0 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Fri, 17 Jul 2020 11:42:06 +0200 Subject: [PATCH] Do not split section if is in table --- src/main/java/w2phtml/xhtml/content/TextParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/w2phtml/xhtml/content/TextParser.java b/src/main/java/w2phtml/xhtml/content/TextParser.java index 5bc31b0..abf9776 100644 --- a/src/main/java/w2phtml/xhtml/content/TextParser.java +++ b/src/main/java/w2phtml/xhtml/content/TextParser.java @@ -434,10 +434,10 @@ public class TextParser extends Parser { if (!displayHiddenText && "none".equals(Misc.getAttribute(onode,TEXT_DISPLAY))) { return hnode; } - if (pageWasOpened) {hnode = docSep.closePage(hnode);} + if (pageWasOpened && !inTable) {hnode = docSep.closePage(hnode);} boolean removeStyleAtExit = setSectionStyle(onode); - if (pageWasOpened) {hnode = docSep.openPage(hnode, pageNum);} + if (pageWasOpened && !inTable) {hnode = docSep.openPage(hnode, pageNum);} hnode = traverseBlockText(onode, hnode); if (isLast) { insertEndnotes((Element) hnode, sectionName);