screenshot-to-code icon indicating copy to clipboard operation
screenshot-to-code copied to clipboard

Use a better HTML code formatter

Open abi opened this issue 1 year ago • 3 comments

When images are replaced, we run the code through BeautifulSoup which changes the code formatting to something much less nice than what GPT outputs. It doesn't format CSS and JS embedded within the HTML. Find and use a different HTML code formatter in image_generation.py

I tried pytidylib and it was no good: https://countergram.github.io/pytidylib

Or could just do it on the client-side (good libraries abound).

abi avatar Nov 16 '23 20:11 abi

I can work on this issue!

namrata18s avatar Nov 18 '23 18:11 namrata18s

@namrata18s awesome! probably easy to do it on the client-side after the image generation code is returned

abi avatar Nov 18 '23 20:11 abi

It is not interesting to use a JSX framework in order to have a file ?

HamzaDams avatar Nov 19 '23 14:11 HamzaDams