git.iko.soy/typeable/pandoc
on master help sign in
SelfContained: use application/octet-stream for unknown mime types...
65a9d3aJohn MacFarlane
src/Text/Pandoc/SelfContained.hs+4−5
@@ -244,11 +244,10 @@ getData mimetype src
244 let raw' = if ext `elem` [".gz", ".svgz"]
244 let raw' = if ext `elem` [".gz", ".svgz"]
245 then B.concat $ L.toChunks $ Gzip.decompress $ L.fromChunks [raw]
245 then B.concat $ L.toChunks $ Gzip.decompress $ L.fromChunks [raw]
246 else raw
246 else raw
247− mime <- case (mimetype, respMime) of
247+ let mime = case (mimetype, respMime) of
248− ("",Nothing) -> throwError $ PandocSomeError
248+ ("",Nothing) -> "application/octet-stream"
249− $ "Could not determine mime type for `" <> src <> "'"
250− (x, Nothing) -> return x
249+ (x, Nothing) -> x
251− (_, Just x ) -> return x
250+ (_, Just x ) -> x
252 result <- if "text/css" `T.isPrefixOf` mime
251 result <- if "text/css" `T.isPrefixOf` mime
253 then do
252 then do
254 oldInputs <- getInputFiles
253 oldInputs <- getInputFiles