@@ -62,6 +62,7 @@ data LogMessage =
62 | CouldNotParseYamlMetadata String SourcePos
62 | CouldNotParseYamlMetadata String SourcePos
63 | DuplicateLinkReference String SourcePos
63 | DuplicateLinkReference String SourcePos
64 | DuplicateNoteReference String SourcePos
64 | DuplicateNoteReference String SourcePos
65+ | DuplicateIdentifier String SourcePos
65 | ReferenceNotFound String SourcePos
66 | ReferenceNotFound String SourcePos
66 | CircularReference String SourcePos
67 | CircularReference String SourcePos
67 | ParsingUnescaped String SourcePos
68 | ParsingUnescaped String SourcePos
@@ -106,6 +107,11 @@ instance ToJSON LogMessage where
106 "source" .= Text.pack (sourceName pos),
107 "source" .= Text.pack (sourceName pos),
107 "line" .= toJSON (sourceLine pos),
108 "line" .= toJSON (sourceLine pos),
108 "column" .= toJSON (sourceColumn pos)]
109 "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)]
109 ReferenceNotFound s pos ->
115 ReferenceNotFound s pos ->
110 ["contents" .= Text.pack s,
116 ["contents" .= Text.pack s,
111 "source" .= Text.pack (sourceName pos),
117 "source" .= Text.pack (sourceName pos),
@@ -184,6 +190,8 @@ showLogMessage msg =
184 "Duplicate link reference '" ++ s ++ "' at " ++ showPos pos
190 "Duplicate link reference '" ++ s ++ "' at " ++ showPos pos
185 DuplicateNoteReference s pos ->
191 DuplicateNoteReference s pos ->
186 "Duplicate note reference '" ++ s ++ "' at " ++ showPos pos
192 "Duplicate note reference '" ++ s ++ "' at " ++ showPos pos
193+ DuplicateIdentifier s pos ->
194+ "Duplicate identifier '" ++ s ++ "' at " ++ showPos pos
187 ReferenceNotFound s pos ->
195 ReferenceNotFound s pos ->
188 "Reference not found for '" ++ s ++ "' at " ++ showPos pos
196 "Reference not found for '" ++ s ++ "' at " ++ showPos pos
189 CircularReference s pos ->
197 CircularReference s pos ->
@@ -233,6 +241,7 @@ messageVerbosity msg =
233 CouldNotParseYamlMetadata{} -> WARNING
241 CouldNotParseYamlMetadata{} -> WARNING
234 DuplicateLinkReference{} -> WARNING
242 DuplicateLinkReference{} -> WARNING
235 DuplicateNoteReference{} -> WARNING
243 DuplicateNoteReference{} -> WARNING
244+ DuplicateIdentifier{} -> WARNING
236 ReferenceNotFound{} -> WARNING
245 ReferenceNotFound{} -> WARNING
237 CircularReference{} -> WARNING
246 CircularReference{} -> WARNING
238 CouldNotLoadIncludeFile{} -> WARNING
247 CouldNotLoadIncludeFile{} -> WARNING
@@ -249,4 +258,4 @@ messageVerbosity msg =
249 CouldNotParseCSS{} -> WARNING
258 CouldNotParseCSS{} -> WARNING
250 Fetching{} -> INFO
259 Fetching{} -> INFO
251 NoTitleElement{} -> WARNING
260 NoTitleElement{} -> WARNING
252− NoLangSpecified -> INFO
261+ NoLangSpecified -> INFO