aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-07-31 09:42:53 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-07-31 09:42:53 -0700
commit76031f01c1a34b896688393fba8990044ba9cc64 (patch)
tree1ebe0cdd3687150cefc2404d25b50c235d0efbff /src
parent143d5b732885a5186dd976ce1b74a91bcb417ead (diff)
parent31e7c1b67ccdb1b885a1305675095ebd28e65f6a (diff)
downloadpandoc-76031f01c1a34b896688393fba8990044ba9cc64.tar.gz
Merge pull request #1472 from mpickering/master
Shared: Added function insertMedia which is an alias for M.insert
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
--