aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-07-31 09:43:08 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-07-31 09:43:08 -0700
commit6e96f8b4783d46e2b9e245bf3144f023c5296a38 (patch)
tree8acc9fa5c818680e280beabfb78e8cfa4dfabe6a /src
parentfcafcaa8e698c7d8834a0a732e63d536de0d942d (diff)
parent76031f01c1a34b896688393fba8990044ba9cc64 (diff)
downloadpandoc-6e96f8b4783d46e2b9e245bf3144f023c5296a38.tar.gz
Merge branch 'master' of github.com:jgm/pandoc
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Shared.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 81aa6cf5a..ee48f5bc1 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -50,6 +50,7 @@ module Text.Pandoc.Shared (
tabFilter,
-- * Media Handling
MediaBag,
+ insertMedia,
-- * Date/time
normalizeDate,
-- * Pandoc block and inline list processing
@@ -292,9 +293,15 @@ tabFilter tabStop =
---
-- | A map of media paths to their binary representations.
-
type MediaBag = M.Map String BL.ByteString
+-- | Insert a media item into a `MediaBag`
+insertMedia :: FilePath
+ -> BL.ByteString
+ -> MediaBag
+ -> MediaBag
+insertMedia = M.insert
+
--
-- Date/time
--