EPUB writer: Add properties attribute to cover-image item for EPUB v3.

This commit is contained in:
John MacFarlane 2013-11-30 19:33:02 -08:00
parent 7f09c1834d
commit 37569f30ed

View file

@ -448,7 +448,12 @@ writeEPUB opts doc@(Pandoc meta _) = do
[("properties","nav") | epub3 ]) $ () [("properties","nav") | epub3 ]) $ ()
] ++ ] ++
map chapterNode (cpgEntry ++ (tpEntry : chapterEntries)) ++ map chapterNode (cpgEntry ++ (tpEntry : chapterEntries)) ++
map pictureNode (cpicEntry ++ picEntries) ++ (case cpicEntry of
[] -> []
(x:_) -> [add_attrs
[Attr (unqual "properties") "cover-image" | epub3]
(pictureNode x)]) ++
map pictureNode picEntries ++
map fontNode fontEntries map fontNode fontEntries
, unode "spine" ! [("toc","ncx")] $ , unode "spine" ! [("toc","ncx")] $
case epubCoverImage metadata of case epubCoverImage metadata of