-
Notifications
You must be signed in to change notification settings - Fork 687
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 Detection #64
Comments
Hi @krjackso, I am sorry for the issue, we should take a look at the regex for the urls. The reason why we switched from NSDataDetector to regex is that data detector is 2x more expensive. See #40 (comment)
|
Yeah URL regexes are a real pain :) Perhaps a decent compromise would be opening up the RegexParser so that we can override the different types of detectors if we need them to be different? The other thing I like about using NSDataDetector for URLs is it will be consistent with other things using it to detect links which will be important for my users who are mostly coming from the bundled iOS apps. |
Yep, i like the idea, but in order to fix and add tests for it, I would like to know first which text is being detected as url, and it is not. Even if we open the Regex parser, there should be a default regex. |
Not able to reproduce, closing... |
I noticed in my app that the word "picture" is detected as a URL. After looking into it, I noticed that any phrase starting with "www" or "pic" will get detected as a URL, even though they are not valid URLs. Looking at the history, we used to use NSDataDetector but switched to a regex. Is there a compelling reason not to use NSDataDetector for this? The only test that fails using NSDataDetector is that "google.com" gets detected as a URL when the test does not want it to be (I would actually prefer it to be). Right now I am running with my fork that uses NSDataDetector until this can be resolved.
The text was updated successfully, but these errors were encountered: