mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 08:25:52 +00:00
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:
@@ -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" !
|
||||
|
||||
Reference in New Issue
Block a user