mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion: Fix a regression in the last release that broke conversion
of a few files with comments just before a chapter start. See #1188635
This commit is contained in:
parent
c6bdca08aa
commit
e500792586
@ -35,7 +35,7 @@ def at_start(elem):
|
||||
for x in body.iter():
|
||||
if x is elem:
|
||||
return True
|
||||
if getattr(x, 'tag', None) and x.tag.rpartition('}')[-1] in {'img', 'svg'}:
|
||||
if hasattr(getattr(x, 'tag', None), 'rpartition') and x.tag.rpartition('}')[-1] in {'img', 'svg'}:
|
||||
return False
|
||||
if isspace(getattr(x, 'text', None)) and (x in ancestors or isspace(getattr(x, 'tail', None))):
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user