-
Notifications
You must be signed in to change notification settings - Fork 109
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
fix(Parser): remove redundant nested repeat operator and escape bracket #90
Conversation
hendrixfan
commented
Nov 5, 2021
- with ruby 2.7.3 I get the following warnings(described in Ruby warnings #89):
- I removed the '?' operators where possible and exchanged them for '*'
- closes Ruby warnings #89
- with ruby 2.7.3 I get the following warnings(described in podigee#89): ``` lib/device_detector/parser.rb:88: warning: regular expression has ']' without escape lib/device_detector/parser.rb:88: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression ``` - I removed the '?' operators where possible and exchanged them for '*' - closes podigee#89
oh, I just read your disclaimer
you are not maintaining these Files yourself |
@hendrixfan I think your search and replace replaced stuff you didn't want to modify. |
@kwent sorry for not elaborating on my changes further. |
@podigee what is the plan here ? I don't think upstream repositories will ever update those cause it's language specific. Maybe a middleman script to do the conversation and update one every few months would make that workflow easier. |
Silence on the airwaves 😅 |
Are they, though? I believe this change should work the same in both languages. There's only a few occurrences (of the initial issue, not the duplicate characters) that I could find, so perhaps they'll accept a PR? Examples: |
I guess we should try to open an issue / PR against https://github.com/matomo-org/device-detector and discuss the changes with their maintainers. If the changes do not break other languages, there may be a chance to get it merged? |
@Spone I have raised that ticket here, if anybody wants to +1 it for visibility: matomo-org/device-detector#6990 |
Regular expressions have been fixed, but you still need to implement the changes that we made here for OS We now have a validator that is guaranteed not to let bad regular expressions slip through. |
Thanks everybody. We will provide a new version of the gem soon. |
in case anyone lands here, v1.0.7 of the gem fixes the issue. thanks @marcelgo @hendrixfan |