aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Logging.hs14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Logging.hs b/src/Text/Pandoc/Logging.hs
index 91b225028..ac45b0a66 100644
--- a/src/Text/Pandoc/Logging.hs
+++ b/src/Text/Pandoc/Logging.hs
@@ -94,7 +94,7 @@ data LogMessage =
| InvalidLang String
| CouldNotHighlight String
| MissingCharacter String
- | Deprecated String
+ | Deprecated String String
deriving (Show, Eq, Data, Ord, Typeable, Generic)
instance ToJSON LogMessage where
@@ -192,8 +192,9 @@ instance ToJSON LogMessage where
["message" .= Text.pack msg]
MissingCharacter msg ->
["message" .= Text.pack msg]
- Deprecated msg ->
- ["message" .= Text.pack msg]
+ Deprecated thing msg ->
+ ["thing" .= Text.pack thing,
+ "message" .= Text.pack msg]
showPos :: SourcePos -> String
@@ -276,8 +277,11 @@ showLogMessage msg =
"Could not highlight code block:\n" ++ m
MissingCharacter m ->
"Missing character: " ++ m
- Deprecated m ->
- "Deprecated: " ++ m
+ Deprecated t m ->
+ "Deprecated: " ++ t ++
+ if null m
+ then ""
+ else ". " ++ m
messageVerbosity:: LogMessage -> Verbosity
messageVerbosity msg =