mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
EPUB Output: If there are no guide elements do not output an empty guide tag. Makes the asinine epubcheck happy. Fixes #1835560 [epub file fails at epub check](https://bugs.launchpad.net/calibre/+bug/1835560)
This commit is contained in:
parent
7f978f859c
commit
224d35cb79
@ -1486,6 +1486,8 @@ class Guide(object):
|
||||
return elem
|
||||
|
||||
def to_opf2(self, parent=None):
|
||||
if not len(self):
|
||||
return
|
||||
elem = element(parent, OPF('guide'))
|
||||
for ref in self.refs.values():
|
||||
attrib = {'type': ref.type, 'href': urlunquote(ref.href)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user