From f78d2f62199a7bab0ae1fccafda6d97dd9681f12 Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Wed, 30 Jul 2014 12:47:26 -0400 Subject: [PATCH] Shared: Make MediaBag available through Shared. --- src/Text/Pandoc/Shared.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 77180bd4b..0282eadf6 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -48,6 +48,8 @@ module Text.Pandoc.Shared ( toRomanNumeral, escapeURI, tabFilter, + -- * Media Handling + MediaBag, -- * Date/time normalizeDate, -- * Pandoc block and inline list processing @@ -114,6 +116,7 @@ import Text.HTML.TagSoup (renderTagsOptions, RenderOptions(..), Tag(..), renderOptions) import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as B8 +import qualified Data.ByteString.Lazy as BL import Text.Pandoc.Compat.Monoid import Data.ByteString.Base64 (decodeLenient) import Data.Sequence (ViewR(..), ViewL(..), viewl, viewr) @@ -280,6 +283,14 @@ tabFilter tabStop = x : go (spsToNextStop - 1) xs in go tabStop +--- +--- Media handling +--- + +-- | A map of media paths to their binary representations. + +type MediaBag = M.Map String BL.ByteString + -- -- Date/time --