This commit is contained in:
Kovid Goyal 2012-05-16 19:42:05 +05:30
parent 2d966ee328
commit eed226a54a

View File

@ -182,7 +182,7 @@ class MergeMetadata(object):
else: else:
text = '' text = ''
text = re.sub(r'\s+', '', text) text = re.sub(r'\s+', '', text)
if not text: if not text and not XPath('//h:img|//svg:svg')(item.data):
self.log('Removing %s as it is a wrapper around' self.log('Removing %s as it is a wrapper around'
' the cover image'%item.href) ' the cover image'%item.href)
self.oeb.spine.remove(item) self.oeb.spine.remove(item)