DOCX Input: Fix empty paragraphs with borders being rendered with an empty line inside the borders

This commit is contained in:
Kovid Goyal 2016-01-27 18:31:51 +05:30
parent 1127fc805c
commit d0aa1c3d95

View File

@ -476,7 +476,7 @@ class Convert(object):
wrapper = self.wrap_elems(spans, SPAN()) wrapper = self.wrap_elems(spans, SPAN())
wrapper.set('class', cls) 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 # Empty paragraph add a non-breaking space so that it is rendered
# by WebKit # by WebKit
dest.text = NBSP dest.text = NBSP