[PR #56] Fixes problem with multiple, similar abbreviations not parsing correctly #795

Closed
opened 2026-01-29 14:45:35 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: Yes


When you have multiple, similar (when an abbreviation is a substring of another abbreviation) abbreviations then only the first abbreviation will be applied.
For example:

*[1A]: First
*[1A1]: Second
*[1A2]: Third
We can abbreviate 1A, 1A1 and 1A2!

should result in:

<p>We can abbreviate <abbr title="First">1A</abbr>, <abbr title="Second">1A1</abbr> and <abbr title="Third">1A2</abbr>!</p>

but instead we get:

<p>We can abbreviate <abbr title="First">1A</abbr>, 1A1 and 1A2!</p>
**Original Pull Request:** https://github.com/xoofx/markdig/pull/56 **State:** closed **Merged:** Yes --- When you have multiple, similar (when an abbreviation is a substring of another abbreviation) abbreviations then only the first abbreviation will be applied. For example: ``` md *[1A]: First *[1A1]: Second *[1A2]: Third We can abbreviate 1A, 1A1 and 1A2! ``` should result in: ``` html <p>We can abbreviate <abbr title="First">1A</abbr>, <abbr title="Second">1A1</abbr> and <abbr title="Third">1A2</abbr>!</p> ``` but instead we get: ``` html <p>We can abbreviate <abbr title="First">1A</abbr>, 1A1 and 1A2!</p> ```
claunia added the pull-request label 2026-01-29 14:45:35 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#795