git.iko.soy/typeable/pandoc
on master help sign in
SelfContained: use application/octet-stream for unknown mime types...

instead of halting with an error. Closes #7202.

commit65a9d3a8786c23f79de9dcdf56ab7efb789726ff authorJohn MacFarlane <jgm@berkeley.edu> dateMon 5 Apr 2021, 08:49 (6 years ago) parent08598de
1 file changed+4−5
src/Text/Pandoc/SelfContained.hs+4−5
src/Text/Pandoc/SelfContained.hs+4−5
@@ -244,11 +244,10 @@ getData mimetype src
244244 let raw' = if ext `elem` [".gz", ".svgz"]
245245 then B.concat $ L.toChunks $ Gzip.decompress $ L.fromChunks [raw]
246246 else raw
247− mime <- case (mimetype, respMime) of
248− ("",Nothing) -> throwError $ PandocSomeError
249− $ "Could not determine mime type for `" <> src <> "'"
250− (x, Nothing) -> return x
251− (_, Just x ) -> return x
247+ let mime = case (mimetype, respMime) of
248+ ("",Nothing) -> "application/octet-stream"
249+ (x, Nothing) -> x
250+ (_, Just x ) -> x
252251 result <- if "text/css" `T.isPrefixOf` mime
253252 then do
254253 oldInputs <- getInputFiles