mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 15:13:41 +02:00
...
This commit is contained in:
parent
a9d6d0969e
commit
fad11b46ee
1 changed files with 2 additions and 2 deletions
|
|
@ -169,12 +169,12 @@ def extract_svg_into_flows(self):
|
|||
|
||||
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…
Reference in a new issue