Quote:
Originally Posted by Rev. Bob
None of that code is close to what I've changed; I don't think it's even getting to the new routines. My first instinct is that the OPF file may not be formatted properly, or perhaps the first file in the spine has a similar issue.
|
I haven't heard anything back on this, and I can't reproduce it on this end.
Meanwhile, I have been reminded to add one more type of "garbage" element to the cleanup list, and it comes in this form:
<?dp n="3" folio="" ?>
(Where N can be any number.)
This seems to be an artifact of some creation software that I haven't encountered directly, but it doesn't appear to serve any purpose in a finished ebook - so out it comes! It's not even as useful as an attribute-less SPAN element, which could at least theoretically be targeted by CSS. Therefore, the strip-spans module now removes anything of this form:
<\?dp([^>]*?)\?>\n?
(Or, for those who don't speak regex, "any single tag delimited by <?dp at one end and ?> at the other, containing anything except the > character in between, along with an optional linefeed at the end." )
The attached versions of the plugin include that fix, and I've updated the help file to remove the "experimental" notes and document the self-closing and empty-removal features. If there are no objections to this version, the only thing I see that's left to do is choose between the one-routine and two-routine options. As before, the file with the longest name is the two-routine version.
Feedback is encouraged, but please let me know which version of the code (one or two routines) you're using.