From d4aad0f2a9216e59bf30665acbc61be61836e660 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 21 May 2013 12:27:28 +0530 Subject: [PATCH] EPUB/AZW3 Output: Fix pages that contain only an svg image being regarded as empty and removed during splitting --- src/calibre/ebooks/oeb/transforms/split.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/oeb/transforms/split.py b/src/calibre/ebooks/oeb/transforms/split.py index 123f61b047..9e4c2a70e6 100644 --- a/src/calibre/ebooks/oeb/transforms/split.py +++ b/src/calibre/ebooks/oeb/transforms/split.py @@ -375,6 +375,8 @@ class FlowSplitter(object): for img in root.xpath('//h:img', namespaces=NAMESPACES): if img.get('style', '') != 'display:none': return False + if root.xpath('//*[local-name() = "svg"]'): + return False return True def split_text(self, text, root, size):