mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Allow span
in toc nav items
According to https://www.w3.org/publishing/epub32/epub-packages.html#sec-package-nav-def-model: "A child `a` element describes the target that the link points to, while a `span` element serves as a heading for breaking down lists into distinct groups (for example, a large list of illustrations can be segmented into several lists, one for each chapter)."
This commit is contained in:
parent
228d9913e0
commit
1336e51c40
1 changed files with 2 additions and 1 deletions
|
@ -191,7 +191,8 @@ class Navigation {
|
|||
*/
|
||||
navItem(item, parent) {
|
||||
let id = item.getAttribute("id") || undefined;
|
||||
let content = filterChildren(item, "a", true);
|
||||
let content = filterChildren(item, "a", true)
|
||||
|| filterChildren(item, "span", true);
|
||||
|
||||
if (!content) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue