[PR #253] Autolink domain name validation #898

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

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

State: closed
Merged: No


#252

This makes it so AutoLinkParser doesn't match links with domain names, that:

  • Have empty segments
  • Have less than 2 segments
  • Contain invalid characters
  • Contain an underscore in the last two segments

This also doesn't match empty emails in mailto: (mailto:@something.com)

@xoofx
I included the Specs.cs file that my VS emits, but it's obviously seriously deformed. Any idea on how to fix it? (I will obviously amend the last commit if I figure that one out)

**Original Pull Request:** https://github.com/xoofx/markdig/pull/253 **State:** closed **Merged:** No --- #252 This makes it so AutoLinkParser doesn't match links with domain names, that: * Have empty segments * Have less than 2 segments * Contain invalid characters * Contain an underscore in the last two segments This also doesn't match empty emails in mailto: (mailto:@something.com) @xoofx I included the Specs.cs file that my VS emits, but it's obviously seriously deformed. Any idea on how to fix it? (I will obviously amend the last commit if I figure that one out)
claunia added the pull-request label 2026-01-29 14:47: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#898