View Single Post
Old 09-14-2010, 11:46 AM   #19
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,389
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by tonyx3 View Post
As for links to chapters working, shouldn't it be able to use my simple regex to match the chapter headings, and then tag them with the appropriate header tags in my output file?
No, you can't just insert random tags into XHTML and have it still be valid. A regex can match anything at all. It could match a fragment something like:

Code:
<span class="ONE">Bad, bad bad<a>
Where only the fragment in bold is matched. How do you suggest calibre insert tags in this case?
kovidgoyal is offline   Reply With Quote