EPUB Output: When splitting dont consider files with only a single character empty

This commit is contained in:
Kovid Goyal 2020-07-31 23:44:13 +05:30
parent f4340d2191
commit 95c4381900
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -297,7 +297,7 @@ class FlowSplitter(object):
return False
txt = re.sub(r'\s+|\xa0', '',
etree.tostring(body, method='text', encoding='unicode'))
if len(txt) > 1:
if len(txt):
return False
for img in root.xpath('//h:img', namespaces=NAMESPACES):
if img.get('style', '') != 'display:none':