Skip to content

Commit

Permalink
Merge pull request #1574 from insin/patch-1
Browse files Browse the repository at this point in the history
Don't escape hyphens for Regex
  • Loading branch information
cpojer authored Sep 2, 2016
2 parents 06033a1 + c43fb67 commit c7a3e0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jest-util/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const escapePathForRegex = (dir: string) => {
};

const escapeStrForRegex =
(string: string) => string.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
(string: string) => string.replace(/[[\]{}()*+?.,\\^$|#\s]/g, '\\$&');

const replacePathSepForRegex = (string: string) => {
if (path.sep === '\\') {
Expand Down

0 comments on commit c7a3e0c

Please sign in to comment.