git.iko.soy/typeable/pandoc
on master help sign in
Shared: Added function insertMedia which is an alias for M.insert
31e7c1bMatthew Pickering
src/Text/Pandoc/Shared.hs+8−1
@@ -50,6 +50,7 @@ module Text.Pandoc.Shared (
50 tabFilter,
50 tabFilter,
51 -- * Media Handling
51 -- * Media Handling
52 MediaBag,
52 MediaBag,
53+ insertMedia,
53 -- * Date/time
54 -- * Date/time
54 normalizeDate,
55 normalizeDate,
55 -- * Pandoc block and inline list processing
56 -- * Pandoc block and inline list processing
@@ -292,9 +293,15 @@ tabFilter tabStop =
292---
293---
293
294
294-- | A map of media paths to their binary representations.
295-- | A map of media paths to their binary representations.
295−
296type MediaBag = M.Map String BL.ByteString
296type MediaBag = M.Map String BL.ByteString
297
297
298+-- | Insert a media item into a `MediaBag`
299+insertMedia :: FilePath
300+ -> BL.ByteString
301+ -> MediaBag
302+ -> MediaBag
303+insertMedia = M.insert
304+
298--
305--
299-- Date/time
306-- Date/time
300--
307--