mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
FB2 Output: Merge ifs
This commit is contained in:
parent
c42d2db421
commit
3e680ac307
@ -471,8 +471,7 @@ class FB2MLizer(object):
|
|||||||
# Process the XHTML tag and styles. Converted to an FB2 tag.
|
# Process the XHTML tag and styles. Converted to an FB2 tag.
|
||||||
# Use individual if statement not if else. There can be
|
# Use individual if statement not if else. There can be
|
||||||
# only one XHTML tag but it can have multiple styles.
|
# only one XHTML tag but it can have multiple styles.
|
||||||
if tag == 'img':
|
if tag == 'img' and elem_tree.attrib.get('src', None):
|
||||||
if elem_tree.attrib.get('src', None):
|
|
||||||
# Only write the image tag if it is in the manifest.
|
# Only write the image tag if it is in the manifest.
|
||||||
ihref = urlnormalize(page.abshref(elem_tree.attrib['src']))
|
ihref = urlnormalize(page.abshref(elem_tree.attrib['src']))
|
||||||
if ihref in self.oeb_book.manifest.hrefs:
|
if ihref in self.oeb_book.manifest.hrefs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user