View Single Post
Old 08-09-2014, 01:18 AM   #14
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by eschwartz View Post
...

Hmmm. From a suggestion of mine in the Modify EPUB expansion discussion: https://www.mobileread.com/forums/sho...83#post2801083

Search:
Code:
<a href="[^<>]*">((?:(?!<(?:a|/a)).)*)</a>
Replace:
Code:
\1
How does that look? (In terms of working, not reading. )

....
OK - so I looked at my current reads-in-progress for another test case.
your code did not fix the example below because there's a class after the <a

That's always going to be the case always if the book has gone through a calibre epub to epub conversion? , because calibre will add classes to every tag.
The previous example I gave was from a completely unedited/ unconverted retail book, but my usual workflow for making a personal reading version is to load original into calibre & immediately convert it epub-to-epub , then tweak only within the resulting copy, never touch the original_epub backup.
I use the convert to add extra CSS so as to zap hyphenation & zap widows & orphans at the same time.

Code:
 <h1 class="calibre10" id="rw-h1_319849-00001"><a class="calibre7" href="../Text/9780857900135_toc.html">4</a></h1>
I'd want to reduce all that to
<h1 class="calibre10">4</h1>
the ID tag is redundant i.e. does not impact the reading experience in any way ?

this find worked ok though:
Code:
<a class="calibre\d" href="[^<>]*">((?:(?!<(?:a|/a)).)*)</a>

Last edited by cybmole; 08-09-2014 at 01:20 AM.
cybmole is offline   Reply With Quote