@@ -91,14 +91,14 @@ isTextFormat :: String -> Bool
9191isTextFormat s = takeWhile (`notElem` "+-") s `notElem` ["odt","docx","epub","epub3"]
9292
9393externalFilter :: FilePath -> [String] -> Pandoc -> IO Pandoc
94−externalFilter f args' d = E.handle filterException $
95− do (exitcode, outbs, errbs) <- pipeProcess Nothing f args' $ encode d
94+externalFilter f args' d = do
95+ (exitcode, outbs, errbs) <- E.handle filterException $
96+ pipeProcess Nothing f args' $ encode d
9697 when (not $ B.null errbs) $ B.hPutStr stderr errbs
9798 case exitcode of
9899 ExitSuccess -> return $ either error id $ eitherDecode' outbs
99− ExitFailure _ -> err 83 $ "Error running filter " ++ f ++ "\n" ++
100− UTF8.toStringLazy outbs
101− where filterException :: E.SomeException -> IO Pandoc
100+ ExitFailure _ -> err 83 $ "Error running filter " ++ f
101+ where filterException :: E.SomeException -> IO a
102102 filterException e = err 83 $ "Error running filter " ++ f ++
103103 "\n" ++ show e
104104