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.
This commit is contained in:
John MacFarlane 2014-09-01 16:31:32 -07:00
parent cb1a8da01c
commit db90667a79

View file

@ -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" !