diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-01-08 16:19:54 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-01-08 16:19:54 -0800 |
commit | 253f342a80028c7a0fe8d67115c4549cf5fc7d42 (patch) | |
tree | 2b560170ff883fcd0d6d3761d54856d0a34cd7e7 /src/Text/Pandoc/Writers | |
parent | b42afe633342d96838fff9116655deea37524e5d (diff) | |
download | pandoc-253f342a80028c7a0fe8d67115c4549cf5fc7d42.tar.gz |
EPUB writer: ensure that picture transforms are done on metadata too.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/EPUB.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 4faaa1631..676cda970 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -416,7 +416,12 @@ pandocToEPUB :: PandocMonad m -> WriterOptions -> Pandoc -> E m B.ByteString -pandocToEPUB version opts doc@(Pandoc meta _) = do +pandocToEPUB version opts doc = do + -- handle pictures + Pandoc meta blocks <- walkM (transformInline opts) doc >>= + walkM transformBlock + picEntries <- mapMaybe (snd . snd) <$> gets stMediaPaths + epubSubdir <- gets stEpubSubdir let epub3 = version == EPUB3 let writeHtml o = fmap (UTF8.fromTextLazy . TL.fromStrict) . @@ -486,11 +491,6 @@ pandocToEPUB version opts doc@(Pandoc meta _) = do (Pandoc meta []) tpEntry <- mkEntry "text/title_page.xhtml" tpContent - -- handle pictures - -- mediaRef <- P.newIORef [] - Pandoc _ blocks <- walkM (transformInline opts') doc >>= - walkM transformBlock - picEntries <- mapMaybe (snd . snd) <$> gets stMediaPaths -- handle fonts let matchingGlob f = do xs <- lift $ P.glob f |