diff options
author | John MacFarlane <jgm@berkeley.edu> | 2013-11-30 19:33:02 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2013-11-30 19:33:02 -0800 |
commit | 37569f30ed35a45b4765e9cd6c408cd167dd3452 (patch) | |
tree | 94c9baee71fb1b7445789a90fcf1000571bba873 /src/Text/Pandoc | |
parent | 7f09c1834da9f87e7715f5c9dc52f4b730da8f3f (diff) | |
download | pandoc-37569f30ed35a45b4765e9cd6c408cd167dd3452.tar.gz |
EPUB writer: Add properties attribute to cover-image item for EPUB v3.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/EPUB.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 9745db5a0..6e1a391af 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -448,7 +448,12 @@ writeEPUB opts doc@(Pandoc meta _) = do [("properties","nav") | epub3 ]) $ () ] ++ 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 , unode "spine" ! [("toc","ncx")] $ case epubCoverImage metadata of |