mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-27 01:24:28 +01:00
Extend workaround for textboxes to also apply to bookmarks/hyperlinks
This commit is contained in:
parent
a33aa68f60
commit
67664e7956
1 changed files with 3 additions and 1 deletions
|
|
@ -382,7 +382,9 @@ def p_parent(x):
|
|||
return x
|
||||
|
||||
for x in descendants(p, 'w:r', 'w:bookmarkStart', 'w:hyperlink'):
|
||||
if x.tag.endswith('}r') and p_parent(x) is p:
|
||||
if p_parent(x) is not p:
|
||||
continue
|
||||
if x.tag.endswith('}r'):
|
||||
span = self.convert_run(x)
|
||||
if current_anchor is not None:
|
||||
(dest if len(dest) == 0 else span).set('id', current_anchor)
|
||||
|
|
|
|||
Loading…
Reference in a new issue