aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorShaun Attfield (shaun@victor) <heurist+git@gmail.com>2013-11-19 08:20:27 +0200
committerShaun Attfield (shaun@victor) <heurist+git@gmail.com>2013-11-19 08:20:27 +0200
commit5b27480e54f4ecfc145bde133f1f51865d9b12a0 (patch)
treef86e02a5f2e8ea33f60c5061fa8f23b276b652ec /src/Text/Pandoc/Writers
parentd07dc971da0123149e751dff987cf9df1a55b75d (diff)
downloadpandoc-5b27480e54f4ecfc145bde133f1f51865d9b12a0.tar.gz
Epub Writer: Add cover reference to guide element (v2)
Avoiding an unnecessary list concatenation. Fixes an issue with calibre http://calibre-ebook.com/ putting the cover at the end of the book if the spine has linear="no". Apparently this is best practice for other converters as well. http://www.idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.6
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs
index ca69a0fd4..be8de7073 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -260,10 +260,11 @@ writeEPUB opts doc@(Pandoc meta _) = do
else "no")] $ ()) :
map chapterRefNode chapterEntries)
, unode "guide" $
- [ unode "reference" !
- [("type","toc"),("title",plainTitle),("href","nav.xhtml")] $ () ]
- ++ [ unode "reference" !
- [("type","cover"),("title","Cover"),("href","cover.xhtml")] $ () ]
+ [ unode "reference" !
+ [("type","toc"),("title",plainTitle),("href","nav.xhtml")] $ ()
+ , unode "reference" !
+ [("type","cover"),("title","Cover"),("href","cover.xhtml")] $ ()
+ ]
]
let contentsEntry = mkEntry "content.opf" contentsData