View Single Post
Old 08-17-2011, 08:41 PM   #7
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: 26,121
Karma: 5101571
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by nickredding View Post
Those toc type index entries ensure that the index entries for the sections have an offset and length that includes the inline section TOC that is inserted into the markup. Without them, I believe the index entries for the sections would have an offset at the beginning of the first article in the section, not the TOC, and the section length would not include the TOC.
Are you sure they're necessary? Looking at the code, the section offset is set independently of the offset of the first article in the section and the length is set as next_section.offset - section.offset
kovidgoyal is offline   Reply With Quote