-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add a naive regex fallback #237
Conversation
@@ -11,7 +11,6 @@ | |||
"(?<![hg]m)score", | |||
"@[a-z]", | |||
"\\(at\\)[a-z]", | |||
"\\(github\\.com/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem out of scope for this fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, this is a side effect of my creating the naive pattern. I examined parts of the existing regular expression and replaced them with more efficient patterns that allow the same coverage.
2cca409
to
5c23d8a
Compare
This changeset adds a fallback for engines that do not support lookbehind in regular expressions. This fallback is less accurate but catches ~78% of bots with less than 1% false-positive.
It is also exposed as "isbotNaive" export.
Solves #236