From 70a2ec517ecd9ea46f940a1dac31880c70f6f41d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 20 Oct 2019 11:00:36 +0530 Subject: [PATCH] oops --- src/calibre/ebooks/pdf/html_writer.py | 2 +- src/pyj/fs_images.pyj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/pdf/html_writer.py b/src/calibre/ebooks/pdf/html_writer.py index 03814d0f04..7d25d115c1 100644 --- a/src/calibre/ebooks/pdf/html_writer.py +++ b/src/calibre/ebooks/pdf/html_writer.py @@ -105,7 +105,7 @@ def fix_fullscreen_images(container): child_tags.append(tag) if len(child_tags) > 1: break - if len(child_tags) == 1 and child_tags[0] == 'div': + if len(child_tags) == 1 and child_tags[0] in ('div', 'svg'): names = [] svg = None for elem in body.iterdescendants('*'): diff --git a/src/pyj/fs_images.pyj b/src/pyj/fs_images.pyj index 19c4d7ae96..d6c98b8c0d 100644 --- a/src/pyj/fs_images.pyj +++ b/src/pyj/fs_images.pyj @@ -27,8 +27,8 @@ def fix_fullscreen_svg_images(): child_names.push(name) if child_names.length > 1: break - if child_names.length is 1 and child_names[0] is 'div': - names = [] + if child_names.length is 1 and (child_names[0] is 'div' or child_names[0] is 'svg'): + names = v'[]' svg = None for node in document.body.querySelectorAll('*'): if node.tagName: