From 95c4381900f186145d70db085001b24e8bd38419 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 31 Jul 2020 23:44:13 +0530 Subject: [PATCH] EPUB Output: When splitting dont consider files with only a single character empty --- src/calibre/ebooks/oeb/transforms/split.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/transforms/split.py b/src/calibre/ebooks/oeb/transforms/split.py index 3124561a2b..16858cef6c 100644 --- a/src/calibre/ebooks/oeb/transforms/split.py +++ b/src/calibre/ebooks/oeb/transforms/split.py @@ -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':