Skip to content

Commit

Permalink
Don't escape hyphens for Regex
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed Sep 2, 2016
1 parent 3e141f0 commit c43fb67
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 c43fb67

Please sign in to comment.