From d0aa1c3d95c2dfe42b3b41801bca7127048eb9ec Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 27 Jan 2016 18:31:51 +0530 Subject: [PATCH] DOCX Input: Fix empty paragraphs with borders being rendered with an empty line inside the borders --- src/calibre/ebooks/docx/to_html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/docx/to_html.py b/src/calibre/ebooks/docx/to_html.py index f861295361..25f9fd3be3 100644 --- a/src/calibre/ebooks/docx/to_html.py +++ b/src/calibre/ebooks/docx/to_html.py @@ -476,7 +476,7 @@ class Convert(object): wrapper = self.wrap_elems(spans, SPAN()) wrapper.set('class', cls) - if not dest.text and len(dest) == 0: + if not dest.text and len(dest) == 0 and not style.has_visible_border(): # Empty paragraph add a non-breaking space so that it is rendered # by WebKit dest.text = NBSP