You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When EpubReader parses toc.xhtml file, it expects to find the <nav epub:type="toc"> element among the children of the <body> element. In this case, the <nav> element is wrapped in <div>, so EpubReader can't find it.
Interestingly, EPUB specification does not specify whether <nav> elements can be wrapped in other elements. It also doesn't prohibit nesting one <nav> into another <nav>. I'll add support for this case in the next release.
vers-one
changed the title
Table of Contents not being read with GetNavigationAsync()?
Parse <nav> elements nested in other HTML elements in EPUB 3 navigation documents
Oct 22, 2023
I'm debugging a book where the Navigation items aren't loading for Table of Contents generation.
This book has a TOC file within it, I see a line in the manifest:
But the GetNavigationAsync() returns nothing. Maybe I have a misunderstanding of the point of this API?
Here are the needed files:
content.opf.txt
toc.ncx.txt
toc.xhtml.txt
The text was updated successfully, but these errors were encountered: