aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/EPUB.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-09-30 16:07:47 -0500
committerJohn MacFarlane <jgm@berkeley.edu>2017-09-30 16:11:20 -0500
commitf3a80034fff41a8b0c13519fa13bed794db1b8d2 (patch)
tree8355bd3c88b87b960171a65aad05b36e6822e8a4 /src/Text/Pandoc/Writers/EPUB.hs
parent9b7d652ab7a0f4cdd86efd92f43f1b20724e8982 (diff)
downloadpandoc-f3a80034fff41a8b0c13519fa13bed794db1b8d2.tar.gz
Removed writerSourceURL, add source URL to common state.
Removed `writerSourceURL` from `WriterOptions` (API change). Added `stSourceURL` to `CommonState`. It is set automatically by `setInputFiles`. Text.Pandoc.Class now exports `setInputFiles`, `setOutputFile`. The type of `getInputFiles` has changed; it now returns `[FilePath]` instead of `Maybe [FilePath]`. Functions in Class that formerly took the source URL as a parameter now have one fewer parameter (`fetchItem`, `downloadOrRead`, `setMediaResource`, `fillMediaBag`). Removed `WriterOptions` parameter from `makeSelfContained` in `SelfContained`.
Diffstat (limited to 'src/Text/Pandoc/Writers/EPUB.hs')
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs
index 04126fbb7..6bae65b6b 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -918,7 +918,7 @@ modifyMediaRef opts oldsrc = do
case lookup oldsrc media of
Just (n,_) -> return n
Nothing -> catchError
- (do (img, mbMime) <- P.fetchItem (writerSourceURL opts) oldsrc
+ (do (img, mbMime) <- P.fetchItem oldsrc
let new = "media/file" ++ show (length media) ++
fromMaybe (takeExtension (takeWhile (/='?') oldsrc))
(('.':) <$> (mbMime >>= extensionFromMimeType))