mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Output: Fix multiple SVG images in the input document causing all the SVG images in the output to be just one of the input images. Fixes #2024433 [Private bug](https://bugs.launchpad.net/calibre/+bug/2024433)
Stupid python loop variable binding rules.
This commit is contained in:
parent
206383eb4b
commit
b3a19a0afc
@ -203,8 +203,12 @@ class ImagesManager:
|
||||
def serialize(self, images_map):
|
||||
for img in self.images.values():
|
||||
images_map['word/' + img.fname] = partial(self.get_data, img.item)
|
||||
|
||||
def get_svg_data(img):
|
||||
return img.item.data_as_bytes_or_none
|
||||
|
||||
for img in self.svg_images.values():
|
||||
images_map['word/' + img.fname] = lambda: img.item.data_as_bytes_or_none
|
||||
images_map['word/' + img.fname] = partial(get_svg_data, img)
|
||||
|
||||
def get_data(self, item):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user