[PR #60] Fixes issue where punctuation forms part of word, so abbreviation is not valid #800

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

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

State: closed
Merged: Yes


I've had an issue where abbreviations are being created for words that contain punctuation.
Example:

*[1A]: First
We should not abbreviate 1.1A

Is rendered as:

<p>We should not abbreviate 1.<abbr title="First">1A</abbr></p>

I've adjusted the AbbreviationParser to allow punctuation to embrace matches only if they are further embraced by \0 or whitespace.

**Original Pull Request:** https://github.com/xoofx/markdig/pull/60 **State:** closed **Merged:** Yes --- I've had an issue where abbreviations are being created for words that contain punctuation. Example: ``` md *[1A]: First We should not abbreviate 1.1A ``` Is rendered as: ``` html <p>We should not abbreviate 1.<abbr title="First">1A</abbr></p> ``` I've adjusted the `AbbreviationParser` to allow punctuation to embrace matches only if they are further embraced by \0 or whitespace.
claunia added the pull-request label 2026-01-29 14:45:41 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#800