Quote:
Originally Posted by thymesnewroman
I've uploaded chapter one (aka index_split_006.xhtml).
|
Thanks for the attachment.
I say go full nuclear. Wipe out all the crap links, substitute with good ones.
(I tested this on your "index_split_006.xhtml" and it worked perfectly on all footnotes in that chapter.)
Full Nuclear Option (For This Book)
1. In Sigil, press
Ctrl+F to pop up the Find/Replace.
Make sure you set
Mode: Regex.
2. Once you have it set to Regex...
These will wipe out all the busted links and substitute them with the number in brackets:
Search: <a class="[^"]+" href="[^"]+"><span class="[^"]+">(\d+)</span></a>
Replace: <a href="#fn\1" id="ft\1">[\1]</a>
and then these 3 will wipe out the broken anchors and fix the Footnotes:
Search: (<p class="[^"]+">)<span class="[^"]+" id="[^"]+"></span>
Replace: \1
Search: (<p class="[^"]+">)<a class="[^"]+" href="[^"]+"><span class="[^"]+"></span></a>
Replace: \1
Search: (<p class="[^"]+">)<a href="#fn[0-9]+" id="ft[0-9]+">\[([0-9]+)\]</a>
Replace: \1<a href="#ft\2" id="fn\2">[\2]</a>
(Completely Optional) If you want to throw away the other anchor code:
Search: <a class="[^"]+" href="[^"]+"><span class="[^"]+"></span></a>
Replace: ***[Blank] PUT NOTHING***
3. After you're done, make sure to go back to Case Sensitive Mode.