I found the nicely-documented
Auto-create a table of contents function, but that requires the chapter headings be simple <h/> tags. I've got a book where the chapter headings look like this:
Code:
<p class="calibre4">
<span class="calibre3">
<strong class="calibre5">
<span lang="EN-US">Chapter 2</span>
</strong>
<span lang="EN-US"></span>
</span>
</p>
Is there a way to adapt the example function to work in this instance?