mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
a9d6d0969e
commit
fad11b46ee
@ -169,12 +169,12 @@ class KF8Writer(object):
|
||||
|
||||
for svg in XPath('//svg:svg')(root):
|
||||
raw = etree.tostring(svg, encoding=unicode, with_tail=False)
|
||||
idx = len(self.flows)
|
||||
self.flows.append(raw)
|
||||
p = svg.getparent()
|
||||
pos = p.index(svg)
|
||||
img = etree.Element(XHTML('img'),
|
||||
src="kindle:flow:%s?mime=image/svg+xml"%to_ref(
|
||||
len(self.flows)))
|
||||
src="kindle:flow:%s?mime=image/svg+xml"%to_ref(idx))
|
||||
p.insert(pos, img)
|
||||
extract(svg)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user