SelfContained: use application/octet-stream for unknown mime types...

instead of halting with an error.
Closes #7202.
This commit is contained in:
John MacFarlane 2021-04-05 08:49:03 -07:00
parent 08598dedb1
commit 65a9d3a878

View file

@ -244,11 +244,10 @@ getData mimetype src
let raw' = if ext `elem` [".gz", ".svgz"]
then B.concat $ L.toChunks $ Gzip.decompress $ L.fromChunks [raw]
else raw
mime <- case (mimetype, respMime) of
("",Nothing) -> throwError $ PandocSomeError
$ "Could not determine mime type for `" <> src <> "'"
(x, Nothing) -> return x
(_, Just x ) -> return x
let mime = case (mimetype, respMime) of
("",Nothing) -> "application/octet-stream"
(x, Nothing) -> x
(_, Just x ) -> x
result <- if "text/css" `T.isPrefixOf` mime
then do
oldInputs <- getInputFiles