[PR #357] Ignore backslashes in GFM AutoLinks #973

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

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

State: closed
Merged: Yes


Fixes #356

The cause for the last character disappearing stems from this span calculation that uses link.Length even though backticks could be removed from the string.
This honors the difference between links and autolinks as stated in CommonMark and does not allow backtick escaping in automatic autolinks.

Edit: I meant backslash, not backtick

**Original Pull Request:** https://github.com/xoofx/markdig/pull/357 **State:** closed **Merged:** Yes --- Fixes #356 The cause for the last character disappearing stems from [this span calculation](https://github.com/lunet-io/markdig/blob/master/src/Markdig/Extensions/AutoLinks/AutoLinkParser.cs#L170) that uses `link.Length` even though backticks could be removed from the string. This honors the difference between links and autolinks as stated [in CommonMark](https://spec.commonmark.org/0.29/#example-306) and does not allow backtick escaping in automatic autolinks. Edit: I meant **backslash**, not backtick
claunia added the pull-request label 2026-01-29 14:48:00 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#973