@@ -62,6 +62,7 @@ data LogMessage =
6262 | CouldNotParseYamlMetadata String SourcePos
6363 | DuplicateLinkReference String SourcePos
6464 | DuplicateNoteReference String SourcePos
65+ | DuplicateIdentifier String SourcePos
6566 | ReferenceNotFound String SourcePos
6667 | CircularReference String SourcePos
6768 | ParsingUnescaped String SourcePos
@@ -106,6 +107,11 @@ instance ToJSON LogMessage where
106107 "source" .= Text.pack (sourceName pos),
107108 "line" .= toJSON (sourceLine pos),
108109 "column" .= toJSON (sourceColumn pos)]
110+ DuplicateIdentifier s pos ->
111+ ["contents" .= Text.pack s,
112+ "source" .= Text.pack (sourceName pos),
113+ "line" .= toJSON (sourceLine pos),
114+ "column" .= toJSON (sourceColumn pos)]
109115 ReferenceNotFound s pos ->
110116 ["contents" .= Text.pack s,
111117 "source" .= Text.pack (sourceName pos),
@@ -184,6 +190,8 @@ showLogMessage msg =
184190 "Duplicate link reference '" ++ s ++ "' at " ++ showPos pos
185191 DuplicateNoteReference s pos ->
186192 "Duplicate note reference '" ++ s ++ "' at " ++ showPos pos
193+ DuplicateIdentifier s pos ->
194+ "Duplicate identifier '" ++ s ++ "' at " ++ showPos pos
187195 ReferenceNotFound s pos ->
188196 "Reference not found for '" ++ s ++ "' at " ++ showPos pos
189197 CircularReference s pos ->
@@ -233,6 +241,7 @@ messageVerbosity msg =
233241 CouldNotParseYamlMetadata{} -> WARNING
234242 DuplicateLinkReference{} -> WARNING
235243 DuplicateNoteReference{} -> WARNING
244+ DuplicateIdentifier{} -> WARNING
236245 ReferenceNotFound{} -> WARNING
237246 CircularReference{} -> WARNING
238247 CouldNotLoadIncludeFile{} -> WARNING
@@ -249,4 +258,4 @@ messageVerbosity msg =
249258 CouldNotParseCSS{} -> WARNING
250259 Fetching{} -> INFO
251260 NoTitleElement{} -> WARNING
252− NoLangSpecified -> INFO
261+ NoLangSpecified -> INFO