aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-12-18 11:47:26 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-12-18 11:47:48 +0300
commitfd0f041a137fa8b850bb00f42d8dcad1bfe5b021 (patch)
tree7e5b9b980858023bbee2dac3cda1f2ae7a7e388f
parent595e954c9bd5bc58ed856495b00bb7aba38660b6 (diff)
downloadpandoc-fd0f041a137fa8b850bb00f42d8dcad1bfe5b021.tar.gz
Decompress .svgz when converting to "data:" URI
Address #5163
-rw-r--r--src/Text/Pandoc/SelfContained.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/SelfContained.hs b/src/Text/Pandoc/SelfContained.hs
index 2aab015c2..d4970dc2b 100644
--- a/src/Text/Pandoc/SelfContained.hs
+++ b/src/Text/Pandoc/SelfContained.hs
@@ -250,7 +250,7 @@ getData _ src@('d':'a':'t':'a':':':_) = return $ Left src-- already data: uri
getData mimetype src = do
let ext = map toLower $ takeExtension src
(raw, respMime) <- fetchItem src
- let raw' = if ext == ".gz"
+ let raw' = if ext `elem` [".gz", ".svgz"]
then B.concat $ L.toChunks $ Gzip.decompress $ L.fromChunks [raw]
else raw
mime <- case (mimetype, respMime) of