Skip to content

Commit 6c11991

Browse files
prozolicCopilot
andauthored
Update src/Markdig/Parsers/ParserList.cs
Co-authored-by: Copilot <[email protected]>
1 parent 7163471 commit 6c11991

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Markdig/Parsers/ParserList.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ protected ParserList(IEnumerable<T> parsersArg) : base(parsersArg)
3838
{
3939
foreach (var openingChar in parser.OpeningCharacters)
4040
{
41-
charCounter.TryAdd(openingChar, 0);
42-
charCounter[openingChar]++;
41+
if (!charCounter.TryAdd(openingChar, 1))
42+
{
43+
charCounter[openingChar]++;
44+
}
4345
}
4446
}
4547
else

0 commit comments

Comments
 (0)