From f0ee52cf5d9160f103806e8ab95aeebda5e09240 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 26 Mar 2014 10:58:29 +0530 Subject: [PATCH] DOCX Input: Fix text from some paragraphs not being converted if the paragraph contains an inline forced page break and no formatted text or line breaks. Fixes #1296817 [Private bug](https://bugs.launchpad.net/calibre/+bug/1296817) [Private bug](https://bugs.launchpad.net/calibre/+bug/1296817) --- src/calibre/ebooks/docx/cleanup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/docx/cleanup.py b/src/calibre/ebooks/docx/cleanup.py index 941893ab4f..77533991cd 100644 --- a/src/calibre/ebooks/docx/cleanup.py +++ b/src/calibre/ebooks/docx/cleanup.py @@ -171,7 +171,7 @@ def cleanup_markup(log, root, styles, dest_dir, detect_cover): if prefix: prefix += '; ' p.set('style', prefix + 'page-break-after:always') - p.text = NBSP + p.text = NBSP if not p.text else p.text if detect_cover: # Check if the first image in the document is possibly a cover