mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
AZW3 Input: Fix svg images that use a prefix for the SVG namespace not being recognized. Fixes #1994988 [Pictures are missing when converting from Epub to Azw3](https://bugs.launchpad.net/calibre/+bug/1994988)
This commit is contained in:
parent
2ee4970e12
commit
d4bc5a73fd
@ -260,13 +260,14 @@ class Mobi8Reader:
|
|||||||
# svg
|
# svg
|
||||||
typ = 'svg'
|
typ = 'svg'
|
||||||
start = m.start()
|
start = m.start()
|
||||||
m2 = image_tag_pattern.search(flowpart)
|
# strip off anything before <svg if inlining
|
||||||
|
from_svg = flowpart[start:]
|
||||||
|
m2 = image_tag_pattern.search(from_svg)
|
||||||
if m2 is not None:
|
if m2 is not None:
|
||||||
format = 'inline'
|
format = 'inline'
|
||||||
dir = None
|
dir = None
|
||||||
fname = None
|
fname = None
|
||||||
# strip off anything before <svg if inlining
|
flowpart = from_svg
|
||||||
flowpart = re.sub(br'(</?)svg:', r'\1', flowpart[start:])
|
|
||||||
else:
|
else:
|
||||||
format = 'file'
|
format = 'file'
|
||||||
dir = "images"
|
dir = "images"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user