diff options
Diffstat (limited to 'src/Text/Pandoc/Logging.hs')
-rw-r--r-- | src/Text/Pandoc/Logging.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Logging.hs b/src/Text/Pandoc/Logging.hs index 832a1f4df..ad3247ec9 100644 --- a/src/Text/Pandoc/Logging.hs +++ b/src/Text/Pandoc/Logging.hs @@ -75,6 +75,7 @@ data LogMessage = | DuplicateIdentifier String SourcePos | ReferenceNotFound String SourcePos | CircularReference String SourcePos + | UndefinedToggle String SourcePos | ParsingUnescaped String SourcePos | CouldNotLoadIncludeFile String SourcePos | MacroAlreadyDefined String SourcePos @@ -144,6 +145,11 @@ instance ToJSON LogMessage where "source" .= Text.pack (sourceName pos), "line" .= toJSON (sourceLine pos), "column" .= toJSON (sourceColumn pos)] + UndefinedToggle s pos -> + ["contents" .= Text.pack s, + "source" .= Text.pack (sourceName pos), + "line" .= toJSON (sourceLine pos), + "column" .= toJSON (sourceColumn pos)] ParsingUnescaped s pos -> ["contents" .= Text.pack s, "source" .= Text.pack (sourceName pos), @@ -238,6 +244,8 @@ showLogMessage msg = "Reference not found for '" ++ s ++ "' at " ++ showPos pos CircularReference s pos -> "Circular reference '" ++ s ++ "' at " ++ showPos pos + UndefinedToggle s pos -> + "Undefined toggle '" ++ s ++ "' at " ++ showPos pos ParsingUnescaped s pos -> "Parsing unescaped '" ++ s ++ "' at " ++ showPos pos CouldNotLoadIncludeFile fp pos -> @@ -306,6 +314,7 @@ messageVerbosity msg = DuplicateIdentifier{} -> WARNING ReferenceNotFound{} -> WARNING CircularReference{} -> WARNING + UndefinedToggle{} -> WARNING CouldNotLoadIncludeFile{} -> WARNING MacroAlreadyDefined{} -> WARNING ParsingUnescaped{} -> INFO |