mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
0d8d44567b
commit
35d005f752
@ -245,14 +245,14 @@ def insert_images_into_markup(parts, resource_map, log):
|
||||
parts[i] = part
|
||||
|
||||
def upshift_markup(parts):
|
||||
tag_pattern = re.compile(r'''(<(svg)[^>]*>)''', re.IGNORECASE)
|
||||
tag_pattern = re.compile(r'''(<(?:svg)[^>]*>)''', re.IGNORECASE)
|
||||
|
||||
for i in xrange(len(parts)):
|
||||
part = parts[i]
|
||||
|
||||
# tag pattern
|
||||
srcpieces = re.split(tag_pattern, part)
|
||||
for j in range(1, len(srcpieces),2):
|
||||
for j in range(1, len(srcpieces), 2):
|
||||
tag = srcpieces[j]
|
||||
if tag[:4].lower() == '<svg':
|
||||
tag = tag.replace('preserveaspectratio','preserveAspectRatio')
|
||||
|
Loading…
x
Reference in New Issue
Block a user