git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #1472 from mpickering/master

Shared: Added function insertMedia which is an alias for M.insert

commit76031f01c1a34b896688393fba8990044ba9cc64 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 31 Jul 2014, 09:42 (12 years ago) parent143d5b731e7c1b
1 file changed+8−1
src/Text/Pandoc/Shared.hs+8−1
src/Text/Pandoc/Shared.hs+8−1
@@ -50,6 +50,7 @@ module Text.Pandoc.Shared (
5050 tabFilter,
5151 -- * Media Handling
5252 MediaBag,
53+ insertMedia,
5354 -- * Date/time
5455 normalizeDate,
5556 -- * Pandoc block and inline list processing
@@ -292,9 +293,15 @@ tabFilter tabStop =
292293---
293294
294295-- | A map of media paths to their binary representations.
295−
296296type MediaBag = M.Map String BL.ByteString
297297
298+-- | Insert a media item into a `MediaBag`
299+insertMedia :: FilePath
300+ -> BL.ByteString
301+ -> MediaBag
302+ -> MediaBag
303+insertMedia = M.insert
304+
298305--
299306-- Date/time
300307--