aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Class.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Class.hs b/src/Text/Pandoc/Class.hs
index 836c57b2e..43721a1f1 100644
--- a/src/Text/Pandoc/Class.hs
+++ b/src/Text/Pandoc/Class.hs
@@ -46,6 +46,7 @@ module Text.Pandoc.Class ( PandocMonad(..)
, getMediaBag
, setMediaBag
, insertMedia
+ , insertDeferredMedia
, fetchItem
, getInputFiles
, getOutputFile
@@ -147,6 +148,12 @@ insertMedia fp mime bs = do
let mb' = MB.insertMedia fp mime bs mb
modifyCommonState $ \st -> st{stDeferredMediaBag =DeferredMediaBag mb' dm }
+insertDeferredMedia :: PandocMonad m => FilePath -> m ()
+insertDeferredMedia fp = do
+ (DeferredMediaBag mb dm) <- getsCommonState stDeferredMediaBag
+ modifyCommonState $
+ \st -> st{stDeferredMediaBag = DeferredMediaBag mb ((DeferredMediaPath fp) : dm)}
+
getInputFiles :: PandocMonad m => m (Maybe [FilePath])
getInputFiles = getsCommonState stInputFiles