diff --git a/nw/gui/dialogs/docmerge.py b/nw/gui/dialogs/docmerge.py index 39c7d0bf..1fc225a9 100644 --- a/nw/gui/dialogs/docmerge.py +++ b/nw/gui/dialogs/docmerge.py @@ -106,7 +106,7 @@ class GuiDocMerge(QDialog): theDoc = NWDoc(self.theProject, self.theParent) theText = "" for tHandle in finalOrder: - theText += theDoc.openDocument(tHandle, False).rstrip() + theText += theDoc.openDocument(tHandle, False).rstrip("\n") theText += "\n\n" if self.sourceItem is None: diff --git a/nw/gui/dialogs/docsplit.py b/nw/gui/dialogs/docsplit.py index f95e0041..e029a49b 100644 --- a/nw/gui/dialogs/docsplit.py +++ b/nw/gui/dialogs/docsplit.py @@ -182,6 +182,7 @@ class GuiDocSplit(QDialog): ) theText = "\n".join(theLines[iStart:iEnd]) + theText = theText.rstrip("\n") + "\n\n" theDoc.openDocument(nHandle, False) theDoc.saveDocument(theText) theDoc.clearDocument()