aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2013-11-30 15:25:28 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2013-11-30 15:25:28 -0800
commit17ef39d1577a7c844f8747294f0e7a0486c1edaa (patch)
tree04a7c7dc6bd89c3f3c9af90d689e0c4dafc7e484 /src/Text/Pandoc/Writers
parent96b678d823b544e3da7dd8531615c52de6164cb8 (diff)
downloadpandoc-17ef39d1577a7c844f8747294f0e7a0486c1edaa.tar.gz
Fixed `cover-image` in EPUB YAML metadata.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs
index a3b01848e..9745db5a0 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -279,7 +279,8 @@ metadataFromMeta opts meta = EPUBMetadata{
relation = metaValueToString <$> lookupMeta "relation" meta
coverage = metaValueToString <$> lookupMeta "coverage" meta
rights = metaValueToString <$> lookupMeta "rights" meta
- coverImage = lookup "epub-cover-image" (writerVariables opts)
+ coverImage = lookup "epub-cover-image" (writerVariables opts) `mplus`
+ (metaValueToString <$> lookupMeta "cover-image" meta)
-- | Produce an EPUB file from a Pandoc document.
writeEPUB :: WriterOptions -- ^ Writer options