From db90667a79bb4e3fc8c0307ddd5fc52533d61337 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 1 Sep 2014 16:31:32 -0700 Subject: 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. --- src/Text/Pandoc/Writers/EPUB.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index c8281018a..32256cb42 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -528,10 +528,8 @@ writeEPUB opts doc@(Pandoc meta _) = do case lookupMeta "title" meta of Just _ -> "yes" Nothing -> "no")] $ ()) : - (unode "itemref" ! [("idref", "nav") - ,("linear", if writerTableOfContents opts - then "yes" - else "no")] $ ()) : + [unode "itemref" ! [("idref", "nav")] $ () + | writerTableOfContents opts ] ++ map chapterRefNode chapterEntries) , unode "guide" $ [ unode "reference" ! -- cgit v1.2.3