epubsana 0.42.0 is out. It also brings 0.41.0, which I did not post about separately.
https://github.com/veripublica/epubs...es/tag/v0.42.0
Doitsu, your br clear="all" case is in this release. Thank you for the sample book, it is what I built and tested this against.
epubsana now removes clear from a br, but only when nothing in the book can float. clear only says where a line goes relative to floating boxes. An EPUB 2 reader ignores the attribute, because XHTML 1.1 does not have it, and a browser-based reader applies it. When there is no float, both draw the same page, so removing it changes nothing a reader sees. If anything in the book could float (a float in any stylesheet or style attribute, an image or table aligned left or right, an @import, or a stylesheet outside the book), the book is left alone, because then the two readings differ and I can't know which one the author saw. On your sample, all 24 are removed. The fix is always asked, never applied without you.
The link and vlink attributes on body are not in this release. They can only go when the book's own CSS already sets the colour of every link, visited or not, as calibre's .pcalibre rules do in your sample. Checking that properly means working out which rule wins for each link, and I have not built that yet. It is next on my list.
Two smaller things since 0.40.0, from epubveri: in an EPUB 3 book a CSS syntax error is now reported as usage rather than an error, and a valid EPUB 2 ops:switch is no longer reported as an error.
As before: your original file is never modified, and the repaired copy is written beside it. The browser version needs no install and uploads nothing:
https://veripublica.github.io/epubsana/
For plugin authors: one new fix_id, fix.br_clear_without_float (ConfirmNeeded). 0.41.0 and 0.42.0 are minors because epubveri's types are part of the API. Nothing in epubsana's own types changed.
If a repair leaves one of your books worse, or looks different in your reader, please tell me here.
https://crates.io/crates/epubsana
https://www.npmjs.com/package/@verip.../epubsana-wasm