Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML Indentation #84

Open
mitten opened this issue Nov 20, 2024 · 1 comment
Open

HTML Indentation #84

mitten opened this issue Nov 20, 2024 · 1 comment

Comments

@mitten
Copy link

mitten commented Nov 20, 2024

As best as I can see, when the plugin does its magic, it also strips all the indentation from the HTML in the process. Is there a way to stop it from doing that? I prefer having the indentation in my HTML (it helps me read it better) - is there a way to have it not strip the tabs out?

@mitten
Copy link
Author

mitten commented Nov 20, 2024

I continued digging around in the plugin code and the BS4 documentation, and found that at the end of the "harvest_feed_images" function, if you change f.write(str(soup)) to f.write(str(soup.prettify())) , it does a decent job of indenting the HTML output. Not absolutely perfect, but way better than the flat output.

Maybe this could be added as an option setting in the plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant