-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Url parsing #59
Comments
URL matching is handled under the hood by Autolinker.js. From what I can tell, this is a side effect of matching URL schemes, so disabling schemeMatches fixes the issue, though that may not be optimal depending on your use case. You can also use a custom matcher with a custom regex for more control. I'll do a bit of digging to see if there's anything that can be done here. Related issue: gregjacobs/Autolinker.js#352 |
Yeah, tldMatches false fixes it but that's undesirable. SchemeMatches shouldn't have impact on this, will test. Proper fix would be in AutoLinker, thx for raising issue there 👍 |
Unfortunately it doesn't look like there's been any progress on the Autolinker.js side. I'm exploring a few options on my end but basically everything I've come up with is going to be a breaking change. My best suggestion for now is to disable the default URL parsing and implement a custom matcher that better suits your needs. The more restrictive regex |
if text is
aaa:google.com
and
url={true}
then entire text is linkified ... it really should be aaa: as string and google.com as link (tldMatches picks up .com correctly but fails to split the preceded text)
The text was updated successfully, but these errors were encountered: