View Single Post
Old 09-18-2024, 05:03 PM   #537
Coleccionista
Connoisseur
Coleccionista is a marvel to beholdColeccionista is a marvel to beholdColeccionista is a marvel to beholdColeccionista is a marvel to beholdColeccionista is a marvel to beholdColeccionista is a marvel to beholdColeccionista is a marvel to beholdColeccionista is a marvel to beholdColeccionista is a marvel to beholdColeccionista is a marvel to beholdColeccionista is a marvel to behold
 
Posts: 73
Karma: 11638
Join Date: Aug 2010
Location: Spain
Device: iPad, Kindle Paperwhite, Kobo Libra 2
This is more of a curiosity. I'm writing a plugin that writes to the XHTML files.I'd like to leave the markup as Sigil's own "Mend and Prettify..." does.
I use Sigil bs4 html parser, by default it just outputs lines with no indentantion and no blank lines between block elements.
The best I've got is by using oup.prettyprint_xhtml that at least indents the code but the blank lines were already lost when the original HTML was parsed and it doesn't add them back.

So, is there any other method or whatever that does that. Or is there no way for a plugin to access that functionality?
I'm not interested in writing my own parser or do elaborate shenanigans to the HTML. It's just in case I missed something obvious.

Last edited by Coleccionista; 09-19-2024 at 01:32 AM.
Coleccionista is offline   Reply With Quote