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

Commit

Permalink
Merge pull request #1033 from adobe/pflynn/issue-971
Browse files Browse the repository at this point in the history
Fix #971 (Find in Files treats \n, \r, etc. as regular expressions)
  • Loading branch information
gruehle committed Jun 12, 2012
2 parents d2b5cf7 + ae7465d commit 9bccb3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/search/FindInFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ define(function (require, exports, module) {
// Query is a string. Turn it into a case-insensitive regexp

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

Expand Down

0 comments on commit 9bccb3b

Please sign in to comment.