Skip to content

Commit d5f8dff

Browse files
authored
Caseinsensitive anchor link check (#341)
* Caseinsensitive anchor link check * Also initialize additionalLabels HashSet with StringComparer.OrdinalIgnoreCase
1 parent 6f7552d commit d5f8dff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Elastic.Markdown/IO/MarkdownFile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public string? NavigationTitle
6060
}
6161

6262
//indexed by slug
63-
private readonly Dictionary<string, PageTocItem> _tableOfContent = new();
63+
private readonly Dictionary<string, PageTocItem> _tableOfContent = new(StringComparer.OrdinalIgnoreCase);
6464
public IReadOnlyDictionary<string, PageTocItem> TableOfContents => _tableOfContent;
6565

66-
private readonly HashSet<string> _additionalLabels = new();
66+
private readonly HashSet<string> _additionalLabels = new(StringComparer.OrdinalIgnoreCase);
6767
public IReadOnlySet<string> AdditionalLabels => _additionalLabels;
6868

6969
public string FilePath { get; }

0 commit comments

Comments
 (0)