mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Add option to AutolinkOptions to allow domains that don't contain a ., e.g. localhost
#728
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JamesNK on GitHub (Mar 15, 2025).
I found https://github.com/xoofx/markdig/issues/827 which has people wanting localhost autolinked. It was closed without helping people support this scenario.
If autolinking http://localhost isn't enabled by default, there should be an option on
AutolinkOptionsto allow it. The alternative requires folks to copy and past all of the autolink code and modify it allow more URLs.@xoofx commented on GitHub (Mar 15, 2025):
Agreed. The option can be added.
@JamesNK commented on GitHub (Mar 16, 2025):
I can make a PR. What kind of option do you want? A bool flag to allow single label host name?
@xoofx commented on GitHub (Mar 16, 2025):
Maybe
AllowHostNameWithoutPeriod? (And add in the API XML an example betwteenhttp:mydomain.comvshttp://localhost)