mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -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
|
||||
typ = 'svg'
|
||||
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:
|
||||
format = 'inline'
|
||||
dir = None
|
||||
fname = None
|
||||
# strip off anything before <svg if inlining
|
||||
flowpart = re.sub(br'(</?)svg:', r'\1', flowpart[start:])
|
||||
flowpart = from_svg
|
||||
else:
|
||||
format = 'file'
|
||||
dir = "images"
|
||||
|
Loading…
x
Reference in New Issue
Block a user