From f63129040b7d9d32366b92c8c435bee52b66d3a7 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 4 May 2013 21:53:06 -0700 Subject: Less verbose output from --self-contained. Now one gets "Fetching [URL]..." for each URL fetched, but not the full header. --- src/Text/Pandoc/Shared.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 39cc386e8..aa33c11f6 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -568,7 +568,8 @@ fetchItem sourceDir s = -- | Read from a URL and return raw data and maybe mime type. openURL :: String -> IO (B.ByteString, Maybe String) openURL u = getBodyAndMimeType `fmap` browse - (do setOutHandler (UTF8.hPutStrLn stderr) + (do S.liftIO $ UTF8.hPutStrLn stderr $ "Fetching " ++ u ++ "..." + setOutHandler $ const (return ()) setAllowRedirects True request (getRequest' u')) where getBodyAndMimeType (_, r) = (rspBody r, findHeader HdrContentType r) -- cgit v1.2.3