diff --git a/backend/image_generation.py b/backend/image_generation.py index 5d4b81c..336cc6e 100644 --- a/backend/image_generation.py +++ b/backend/image_generation.py @@ -110,4 +110,5 @@ async def generate_images(code, image_cache): print("Image generation failed for alt text:" + img.get("alt")) # Return the modified HTML - return str(soup) + # (need to prettify it because BeautifulSoup messes up the formatting) + return soup.prettify()