mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-08 05:44:58 +00:00
Markdown.ToHtml throws IndexOutOfRangeException for lastBlock in GetCurrentDefinitionList #712
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mschessler on GitHub (Jan 1, 2025).
Tested Version: newest commit
d1233ffe66on mainI did not really take a closer look why this is happening but the problem is DefinitionListParser.GetCurrentDefinitionList() calling previousParent with index = -1 if the lastBlock is a BlankLineBlock.
Casting -1 to an unsigned int is then problematic.
Reproducer:
or
Stacktrace:
ThrowHelper removed for Stacktrace.