diff options
-rw-r--r-- | src/Text/Pandoc/Writers/EPUB.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 8a020002e..20b9f190d 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -107,9 +107,9 @@ writeEPUB opts doc@(Pandoc meta _) = do Pandoc _ blocks <- bottomUpM (transformInlines (writerHTMLMathMethod opts') sourceDir picsRef) doc pics <- readIORef picsRef - -- TODO make this work with URLs: - let readPicEntry (oldsrc, newsrc) = readEntry [] oldsrc >>= \e -> - return e{ eRelativePath = newsrc } + let readPicEntry (oldsrc, newsrc) = do + (img,_) <- fetchItem sourceDir oldsrc + return $ toEntry newsrc epochtime $ B.fromChunks . (:[]) $ img picEntries <- mapM readPicEntry pics -- handle fonts |