jest-regex-util
Advanced tools
Comparing version 23.0.0 to 23.3.0
@@ -23,3 +23,4 @@ 'use strict'; | ||
return replacePathSepForRegex(escapeStrForRegex(dir)); | ||
}); /** | ||
}); | ||
/** | ||
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved. | ||
@@ -38,5 +39,8 @@ * | ||
if (_path2.default.sep === '\\') { | ||
return string.replace(/(\/|\\(?![[\]{}()*+?.^$|]))/g, '\\\\'); | ||
return string.replace( | ||
/(\/|(.)?\\(?![[\]{}()*+?.^$|\\]))/g, | ||
(_match, p1, p2) => (p2 && p2 !== '\\' ? p2 + '\\\\' : '\\\\') | ||
); | ||
} | ||
return string; | ||
}); |
{ | ||
"name": "jest-regex-util", | ||
"version": "23.0.0", | ||
"version": "23.3.0", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
1487
37