From 31e7c1b67ccdb1b885a1305675095ebd28e65f6a Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Thu, 31 Jul 2014 15:47:49 +0100 Subject: Shared: Added function insertMedia which is an alias for M.insert --- src/Text/Pandoc/Shared.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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 -- -- cgit v1.2.3