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):
|
for svg in XPath('//svg:svg')(root):
|
||||||
raw = etree.tostring(svg, encoding=unicode, with_tail=False)
|
raw = etree.tostring(svg, encoding=unicode, with_tail=False)
|
||||||
|
idx = len(self.flows)
|
||||||
self.flows.append(raw)
|
self.flows.append(raw)
|
||||||
p = svg.getparent()
|
p = svg.getparent()
|
||||||
pos = p.index(svg)
|
pos = p.index(svg)
|
||||||
img = etree.Element(XHTML('img'),
|
img = etree.Element(XHTML('img'),
|
||||||
src="kindle:flow:%s?mime=image/svg+xml"%to_ref(
|
src="kindle:flow:%s?mime=image/svg+xml"%to_ref(idx))
|
||||||
len(self.flows)))
|
|
||||||
p.insert(pos, img)
|
p.insert(pos, img)
|
||||||
extract(svg)
|
extract(svg)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user