diff options
Diffstat (limited to 'src/Text/Pandoc/Logging.hs')
-rw-r--r-- | src/Text/Pandoc/Logging.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Logging.hs b/src/Text/Pandoc/Logging.hs index ba836b91a..3d2cc2287 100644 --- a/src/Text/Pandoc/Logging.hs +++ b/src/Text/Pandoc/Logging.hs @@ -62,6 +62,7 @@ data LogMessage = | CouldNotParseYamlMetadata String SourcePos | DuplicateLinkReference String SourcePos | DuplicateNoteReference String SourcePos + | DuplicateIdentifier String SourcePos | ReferenceNotFound String SourcePos | CircularReference String SourcePos | ParsingUnescaped String SourcePos @@ -106,6 +107,11 @@ instance ToJSON LogMessage where "source" .= Text.pack (sourceName pos), "line" .= toJSON (sourceLine pos), "column" .= toJSON (sourceColumn pos)] + DuplicateIdentifier s pos -> + ["contents" .= Text.pack s, + "source" .= Text.pack (sourceName pos), + "line" .= toJSON (sourceLine pos), + "column" .= toJSON (sourceColumn pos)] ReferenceNotFound s pos -> ["contents" .= Text.pack s, "source" .= Text.pack (sourceName pos), @@ -184,6 +190,8 @@ showLogMessage msg = "Duplicate link reference '" ++ s ++ "' at " ++ showPos pos DuplicateNoteReference s pos -> "Duplicate note reference '" ++ s ++ "' at " ++ showPos pos + DuplicateIdentifier s pos -> + "Duplicate identifier '" ++ s ++ "' at " ++ showPos pos ReferenceNotFound s pos -> "Reference not found for '" ++ s ++ "' at " ++ showPos pos CircularReference s pos -> @@ -233,6 +241,7 @@ messageVerbosity msg = CouldNotParseYamlMetadata{} -> WARNING DuplicateLinkReference{} -> WARNING DuplicateNoteReference{} -> WARNING + DuplicateIdentifier{} -> WARNING ReferenceNotFound{} -> WARNING CircularReference{} -> WARNING CouldNotLoadIncludeFile{} -> WARNING @@ -249,4 +258,4 @@ messageVerbosity msg = CouldNotParseCSS{} -> WARNING Fetching{} -> INFO NoTitleElement{} -> WARNING - NoLangSpecified -> INFO
\ No newline at end of file + NoLangSpecified -> INFO |