git.iko.soy/typeable/pandoc
on master help sign in
EPUB writer: Don't include nav node in spine unless --toc was requested.

Previously we included it in the spine with `linear="no"`, leading to odd results in some readers. Closes #1593.

commitdb90667a79bb4e3fc8c0307ddd5fc52533d61337 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 1 Sep 2014, 16:31 (12 years ago) parentcb1a8da
1 file changed+2−4
src/Text/Pandoc/Writers/EPUB.hs+2−4
src/Text/Pandoc/Writers/EPUB.hs+2−4
@@ -528,10 +528,8 @@ writeEPUB opts doc@(Pandoc meta _) = do
528528 case lookupMeta "title" meta of
529529 Just _ -> "yes"
530530 Nothing -> "no")] $ ()) :
531− (unode "itemref" ! [("idref", "nav")
532− ,("linear", if writerTableOfContents opts
533− then "yes"
534− else "no")] $ ()) :
531+ [unode "itemref" ! [("idref", "nav")] $ ()
532+ | writerTableOfContents opts ] ++
535533 map chapterRefNode chapterEntries)
536534 , unode "guide" $
537535 [ unode "reference" !