aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-10-23 15:00:11 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-10-23 15:00:11 -0700
commit1a82ecbb6866a00689e3220d304a0fafd81358bb (patch)
treed54250886fecbb730e352620eed74a18630749b8 /src/Text
parenta27dc79073dacfa325275a7dee35322738ba05b5 (diff)
downloadpandoc-1a82ecbb6866a00689e3220d304a0fafd81358bb.tar.gz
More pleasing presentation of warnings and info messages.
!! warning -- info
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Class.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Class.hs b/src/Text/Pandoc/Class.hs
index 65f8f33d0..bee529bd8 100644
--- a/src/Text/Pandoc/Class.hs
+++ b/src/Text/Pandoc/Class.hs
@@ -111,7 +111,6 @@ import Text.Parsec (ParsecT, getPosition, sourceLine, sourceName)
import qualified Text.Pandoc.Compat.Time as IO (getCurrentTime)
import Text.Pandoc.MIME (MimeType, getMimeType, extensionFromMimeType)
import Text.Pandoc.Definition
-import Data.Char (toLower)
import Data.Digest.Pure.SHA (sha1, showDigest)
import Data.Maybe (fromMaybe)
import Data.Time.Clock.POSIX ( utcTimeToPOSIXSeconds
@@ -513,8 +512,10 @@ instance PandocMonad PandocIO where
getCommonState = PandocIO $ lift get
putCommonState x = PandocIO $ lift $ put x
logOutput msg = liftIO $ do
- UTF8.hPutStr stderr $ "[" ++
- map toLower (show (messageVerbosity msg)) ++ "] "
+ UTF8.hPutStr stderr $
+ case messageVerbosity msg of
+ WARNING -> "!! "
+ _ -> ".. "
alertIndent $ lines $ showLogMessage msg
alertIndent :: [String] -> IO ()
@@ -522,7 +523,7 @@ alertIndent [] = return ()
alertIndent (l:ls) = do
UTF8.hPutStrLn stderr l
mapM_ go ls
- where go l' = do UTF8.hPutStr stderr "! "
+ where go l' = do UTF8.hPutStr stderr " "
UTF8.hPutStrLn stderr l'
-- | Specialized version of parseURIReference that disallows