aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-01 16:31:32 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-01 16:31:32 -0700
commitdb90667a79bb4e3fc8c0307ddd5fc52533d61337 (patch)
tree013d7237097e51250850d8e11571ca18d344b2b7 /src/Text
parentcb1a8da01c5ff98d8e2bc64efb1c401c1cf0dc82 (diff)
downloadpandoc-db90667a79bb4e3fc8c0307ddd5fc52533d61337.tar.gz
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.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs6
1 files changed, 2 insertions, 4 deletions
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" !