mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion: Fix removal of empty inline tags
Conversion: Fix empty inline tags that are the second child of a paragraph causing text change location. Fixes #1207735 [Conversion issue from epub to mobi. Italicized word sometimes moves to end of paragrah.](https://bugs.launchpad.net/calibre/+bug/1207735)
This commit is contained in:
parent
6c630b280f
commit
b5f1010d8a
@ -399,7 +399,7 @@ def parse_html(data, log=None, decoder=None, preprocessor=None,
|
|||||||
idx = p.index(a) -1
|
idx = p.index(a) -1
|
||||||
p.remove(a)
|
p.remove(a)
|
||||||
if a.tail:
|
if a.tail:
|
||||||
if idx <= 0:
|
if idx < 0:
|
||||||
if p.text is None:
|
if p.text is None:
|
||||||
p.text = ''
|
p.text = ''
|
||||||
p.text += a.tail
|
p.text += a.tail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user