diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-05-17 21:22:46 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-05-18 22:35:18 -0700 |
commit | 9b5798bd9abe267f783dab7fe5295c9b61e2fdce (patch) | |
tree | a125012799c3ea4b39eb798e2772a18255a67102 /src/Text/Pandoc/Class | |
parent | ddbd984a0d8ea7e75f78ad6632fe3568e2390deb (diff) | |
download | pandoc-9b5798bd9abe267f783dab7fe5295c9b61e2fdce.tar.gz |
Use fetchItem instead of downloadOrRead in fetchMediaResource.
Diffstat (limited to 'src/Text/Pandoc/Class')
-rw-r--r-- | src/Text/Pandoc/Class/PandocMonad.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Class/PandocMonad.hs b/src/Text/Pandoc/Class/PandocMonad.hs index 226194503..b12850de5 100644 --- a/src/Text/Pandoc/Class/PandocMonad.hs +++ b/src/Text/Pandoc/Class/PandocMonad.hs @@ -635,7 +635,7 @@ withPaths (p:ps) action fp = fetchMediaResource :: PandocMonad m => T.Text -> m (FilePath, Maybe MimeType, BL.ByteString) fetchMediaResource src = do - (bs, mt) <- downloadOrRead src + (bs, mt) <- fetchItem src let ext = fromMaybe (T.pack $ takeExtension $ T.unpack src) (mt >>= extensionFromMimeType) let bs' = BL.fromChunks [bs] |