Quote:
Originally Posted by cybmole
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).