mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Input: Fix error when converting DOCX file that contains only image based links and no text based links. Fixes #1263021 [Book failed to convert docx to ePub](https://bugs.launchpad.net/calibre/+bug/1263021)
This commit is contained in:
parent
ac3adb8a78
commit
e586ce4f41
@ -184,7 +184,7 @@ class Images(object):
|
|||||||
img = IMG(src='images/%s' % src)
|
img = IMG(src='images/%s' % src)
|
||||||
img.set('alt', alt or 'Image')
|
img.set('alt', alt or 'Image')
|
||||||
if link is not None:
|
if link is not None:
|
||||||
self.links.append((img, link))
|
self.links.append((img, link, self.rid_map))
|
||||||
return img
|
return img
|
||||||
|
|
||||||
def drawing_to_html(self, drawing, page):
|
def drawing_to_html(self, drawing, page):
|
||||||
|
@ -516,7 +516,7 @@ class Convert(object):
|
|||||||
continue
|
continue
|
||||||
span.set('href', url)
|
span.set('href', url)
|
||||||
|
|
||||||
for img, link in self.images.links:
|
for img, link, relationships_by_id in self.images.links:
|
||||||
parent = img.getparent()
|
parent = img.getparent()
|
||||||
idx = parent.index(img)
|
idx = parent.index(img)
|
||||||
a = A(img)
|
a = A(img)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user