I've now written this to run on each whole xhtml file at a time and it's certainly very quick. One thing that I have noticed however: the files start off with LF as the end-of-line marker, but by the time I have written them back the lines end with CR LF. I can't see how I've achieved this, (it's not in my regexes). I use a simple read() and write() and presume these are not the cause.
Any ideas what's doing this? It doesn't seem to stop the ePub from working but it feels messy to have some files with a different line termination.
(Calibre 0.8.69 on Windows 7 x64)
|