[PR #836] Fix an error in the AbbreviationParser. #1247

Open
opened 2026-01-29 14:52:01 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/xoofx/markdig/pull/836

State: closed
Merged: Yes


The modified end of the previous literal is assigned to the literal next to abbrevion. The test of the abbreviations in TestSourcePosition.cs passes only because there is an abbreviation at the end of the string, and thus no literal remains after it. But add some literals after the abbreviation, say, a period '.', and instead of expected literal with the span 103-103 there will be one with the end less then the start (103-98).

**Original Pull Request:** https://github.com/xoofx/markdig/pull/836 **State:** closed **Merged:** Yes --- The modified end of the previous literal is assigned to the literal next to abbrevion. The test of the abbreviations in TestSourcePosition.cs passes only because there is an abbreviation at the end of the string, and thus no literal remains after it. But add some literals after the abbreviation, say, a period '.', and instead of expected literal with the span 103-103 there will be one with the end less then the start (103-98).
claunia added the pull-request label 2026-01-29 14:52:01 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1247