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);