Update src/Markdig/Helpers/LinkHelper.cs

Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
This commit is contained in:
James Newton-King
2025-03-18 14:54:20 +08:00
committed by GitHub
parent ee403ce28f
commit 90c73b7754

View File

@@ -1006,7 +1006,7 @@ public static class LinkHelper
return c == '\0' || c.IsSpaceOrTab() || c.IsControl() || (isAutoLink && c == '<'); // TODO: specs unclear. space is strict or relaxed? (includes tabs?)
}
public static bool IsValidDomain(string link, int prefixLength, bool allowDomainWithoutPeriod)
public static bool IsValidDomain(string link, int prefixLength, bool allowDomainWithoutPeriod = false)
{
// https://github.github.com/gfm/#extended-www-autolink
// A valid domain consists of alphanumeric characters, underscores (_), hyphens (-) and periods (.).