View Single Post
Old 08-09-2014, 01:34 AM   #15
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,664
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by cybmole View Post
surely that strips the a tags but does not remove the href="whatever" bit ?
I don't follow you. The href="whatever" bit is part of the 'a' tag. you can't strip the 'a' tags without removing the href. Just try the regex and you'll see exactly what it will remove. There's no need to wonder.

As for why you want to remove them (or why you don't think there's a 'normal' reason to want one in a typical novel), I don't really care. The fact is: nav entries in the ncx file quite often point to those anchors--as do the spine/guide elements of the opf. That makes blindly removing them quite risky, in my opinion. If you're 100% certain the nav entries and the spine/guide elements of your ebook's ncx/opf all point to HTML files directly (no URL fragments representing the ids of those 'a' tags), then of course the peril I spoke of is less. It has nothing to do with being a "basic storytelling novel", and everything to do with "that's just how some ebooks (even commercial ones) are constructed sometimes."

Quote:
& I've not looked deeply into footnote coding techniques, but does best practice for those need the a href constructs ?
The short answer is "yes." Though it's not really a "best practice" thing so much as a "there's really no other way to do it" thing (in epub2 anyway).

Last edited by DiapDealer; 08-09-2014 at 01:49 AM.
DiapDealer is online now   Reply With Quote