Autolinker.js icon indicating copy to clipboard operation
Autolinker.js copied to clipboard

Numeric URLs without TLD does not link

Open haugstrup opened this issue 6 years ago • 0 comments

custom://q123 will link custom://1234 will not link

Granted this is a niche case, but it's not uncommon to see these types of URLs in intranets or other non-public tooling.

I think this is because urlMatchDoesNotHaveAtLeastOneWordChar uses hasWordCharAfterProtocolRegex which matches letters, but not numbers.

I believe this check should be loosened to allow numbers if the protocol includes //. For example custom://123 should link while custom:123 should not.

haugstrup avatar Dec 20 '19 21:12 haugstrup