Skip to content

Commit

Permalink
chore: update with repo template
Browse files Browse the repository at this point in the history
Fix regex
  • Loading branch information
SebastianScheidegger committed Jan 29, 2025
1 parent c1b4b2d commit c208a7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/svg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# Process img tags, replacing base64 SVG images with PNGs
def process_svg(html: str) -> str:
pattern = re.compile(r'<img(?P<intermediate>[^>]*?)src="data:(?P<type>[^;>]+);base64,(?P<base64>[^"]+)"')
pattern = re.compile(r'<img(?P<intermediate>[^>]+?src="data:)(?P<type>[^;>]+);base64,(?P<base64>[^"]+)"')
return re.sub(pattern, replace_img_base64, html)


Expand Down

0 comments on commit c208a7b

Please sign in to comment.