aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Class
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-05-17 21:22:46 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-05-18 22:35:18 -0700
commit9b5798bd9abe267f783dab7fe5295c9b61e2fdce (patch)
treea125012799c3ea4b39eb798e2772a18255a67102 /src/Text/Pandoc/Class
parentddbd984a0d8ea7e75f78ad6632fe3568e2390deb (diff)
downloadpandoc-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.hs2
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]