Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 9bccb3b

Browse files
committed
Merge pull request #1033 from adobe/pflynn/issue-971
Fix #971 (Find in Files treats \n, \r, etc. as regular expressions)
2 parents d2b5cf7 + ae7465d commit 9bccb3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/search/FindInFiles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ define(function (require, exports, module) {
271271
// Query is a string. Turn it into a case-insensitive regexp
272272

273273
// Escape regex special chars
274-
query = query.replace(/(\(|\)|\{|\}|\[|\]|\.|\^|\$|\||\?|\+|\*)/g, "\\$1");
274+
query = query.replace(/([(){}\[\].\^$|?+*\\])/g, "\\$1");
275275
return new RegExp(query, "gi");
276276
}
277277

0 commit comments

Comments
 (0)