This commit is contained in:
Kovid Goyal 2012-03-10 09:04:06 +05:30
parent 0d8d44567b
commit 35d005f752

View File

@ -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')