-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Don't escape hyphens for Regex #1574
Conversation
Hmmm.. I'm trying to figure out if we need to ever escape hyphen when we always escape square brackets – I think not. This is probably whatever people on stack overflow recommend to use and I think it might be flawed :) cc @davidaurelio what do you think? |
Agreed, as hyphens are only "special" inside square brackets, and even then it depends on where the hyphen is (thanks, Regexps!) The obligatory @sindresorhus module doesn't escape them either: https://github.com/sindresorhus/escape-string-regexp/blob/master/index.js 😸 |
awesome, thank you so much for the quick fix. I'll publish a fix for Jest tomorrow morning. This also fixes #1551. |
Current coverage is 90.29% (diff: 100%)@@ master #1574 diff @@
==========================================
Files 28 28
Lines 1123 1123
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 1014 1014
Misses 109 109
Partials 0 0
|
I ended up with the exact same fix for windows. |
We'll figure out where to go from here and how to put a lasting fix in place. We are still working on getting Jest's tests onto AppVeyor. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This fixes facebook/create-react-app#542 for me locally