prettify code after image generation

This commit is contained in:
Abi Raja 2023-11-16 14:43:50 -05:00
parent ebedef2bef
commit 640f41619c

View File

@ -110,4 +110,5 @@ async def generate_images(code, image_cache):
print("Image generation failed for alt text:" + img.get("alt")) print("Image generation failed for alt text:" + img.get("alt"))
# Return the modified HTML # Return the modified HTML
return str(soup) # (need to prettify it because BeautifulSoup messes up the formatting)
return soup.prettify()