aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/App.hs4
-rw-r--r--src/Text/Pandoc/Class.hs6
-rw-r--r--src/Text/Pandoc/PDF.hs5
3 files changed, 8 insertions, 7 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index 6bc345d73..f340259f3 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -70,7 +70,7 @@ import System.IO.Error (isDoesNotExistError)
import Text.Pandoc
import Text.Pandoc.Builder (setMeta)
import Text.Pandoc.Class (PandocIO, getLog, withMediaBag,
- extractMedia, fillMedia)
+ extractMedia, fillMediaBag)
import Text.Pandoc.Highlighting (highlightingStyles)
import Text.Pandoc.Lua ( runLuaFilter )
import Text.Pandoc.PDF (makePDF)
@@ -414,7 +414,7 @@ convertWithOpts opts = do
runIO' $ do
(doc, media) <- withMediaBag $ sourceToDoc sources >>=
( (if isJust (optExtractMedia opts)
- then fillMedia (writerSourceURL writerOptions)
+ then fillMediaBag (writerSourceURL writerOptions)
else return)
>=> maybe return extractMedia (optExtractMedia opts)
>=> return . flip (foldr addMetadata) metadata
diff --git a/src/Text/Pandoc/Class.hs b/src/Text/Pandoc/Class.hs
index 7407d0799..4ef56ec33 100644
--- a/src/Text/Pandoc/Class.hs
+++ b/src/Text/Pandoc/Class.hs
@@ -61,7 +61,7 @@ module Text.Pandoc.Class ( PandocMonad(..)
, runIOorExplode
, runPure
, withMediaBag
- , fillMedia
+ , fillMediaBag
, extractMedia
) where
@@ -346,8 +346,8 @@ withPaths (p:ps) action fp =
(\_ -> withPaths ps action fp)
-- | Traverse tree, filling media bag.
-fillMedia :: PandocMonad m => Maybe String -> Pandoc -> m Pandoc
-fillMedia sourceURL d = walkM handleImage d
+fillMediaBag :: PandocMonad m => Maybe String -> Pandoc -> m Pandoc
+fillMediaBag sourceURL d = walkM handleImage d
where handleImage :: PandocMonad m => Inline -> m Inline
handleImage (Image attr lab (src, tit)) = catchError
(do (bs, mt) <- fetchItem sourceURL src
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs
index 240da3ef0..7097337e2 100644
--- a/src/Text/Pandoc/PDF.hs
+++ b/src/Text/Pandoc/PDF.hs
@@ -63,7 +63,8 @@ import Text.Pandoc.Writers.Shared (getField, metaToJSON)
import Data.List (intercalate)
#endif
import Text.Pandoc.Class (PandocIO, report, runIO, runIOorExplode,
- setMediaBag, setVerbosity, fillMedia, extractMedia)
+ setMediaBag, setVerbosity,
+ fillMediaBag, extractMedia)
import Text.Pandoc.Logging
#ifdef _WINDOWS
@@ -138,7 +139,7 @@ handleImages verbosity opts mediabag tmpdir doc = do
doc' <- runIOorExplode $ do
setVerbosity verbosity
setMediaBag mediabag
- fillMedia (writerSourceURL opts) doc >>=
+ fillMediaBag (writerSourceURL opts) doc >>=
extractMedia tmpdir
walkM (convertImages verbosity tmpdir) doc'