Minor fixes
This commit is contained in:
parent
9996b3bc2d
commit
04ddf53c4f
@ -14,7 +14,7 @@ def embed_svg_images(filename_in: Path, overwrite: bool = True):
|
|||||||
images_b64 = {} # cache base-64 encoded images
|
images_b64 = {} # cache base-64 encoded images
|
||||||
num_images = 0 # just for debugging
|
num_images = 0 # just for debugging
|
||||||
re_xlink=re.compile(r"xlink:href=\"(?P<URL>.*?)\"", re.IGNORECASE)
|
re_xlink=re.compile(r"xlink:href=\"(?P<URL>.*?)\"", re.IGNORECASE)
|
||||||
with open(filename_in) as file_in, open(filename_out,'w') as file_out:
|
with open(filename_in,'r') as file_in, open(filename_out,'w') as file_out:
|
||||||
for line in file_in:
|
for line in file_in:
|
||||||
for xlink in re_xlink.finditer(line):
|
for xlink in re_xlink.finditer(line):
|
||||||
num_images = num_images + 1
|
num_images = num_images + 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user