Skip to content

Commit f9890e6

Browse files
committed
Avoid duplicated positions in error report. This happens when other languages subsitites with problemetic English page.
1 parent 0251f7f commit f9890e6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

converter/generator/ProblemRecorder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace OriginLab.DocumentGeneration;
55
public sealed class ProblemRecorder
66
{
77
private readonly string SourceFolder;
8-
private readonly Dictionary<string, List<(FilePosition filePosition, string? details)>> Problems = [];
8+
private readonly Dictionary<string, HashSet<(FilePosition filePosition, string? details)>> Problems = [];
99

1010
public bool Any => Problems.Count > 0;
1111

@@ -28,6 +28,6 @@ public void Record(string sourcePath, string category, string? details = null, T
2828

2929
public List<(string category, List<(FilePosition filePosition, string? details)> locations)> GetRecords()
3030
{
31-
return (from kvp in Problems select (kvp.Key, kvp.Value)).ToList();
31+
return (from kvp in Problems select (kvp.Key, kvp.Value.ToList())).ToList();
3232
}
3333
}

0 commit comments

Comments
 (0)