{"action":"created","comment":{"url":"https://api.github.com/repos/adobe/brackets/pulls/comments/51449000","id":51449000,"diff_hunk":"@@ -522,6 +522,28 @@ define(function (require, exports, module) {\n         };\n     }\n \n+    /**\n+     * Parses a string and replace the \\r, \\n and \\t sequences of characters\n+     * with a character based on the regex meaning of these sequences.\n+     * \\n => Line Feed\n+     * \\r => Carriage Return\n+     * \\t => Tab\n+     */\n+    function parseString(string) {\n+        return string.replace(/\\\\(.)/g, function (match, ch) {\n+            if (ch === \"n\") {\n+                return \"\\n\";\n+            }\n+            if (ch === \"r\") {\n+                return \"\\r\";\n+            }\n+            if (ch === \"t\") {\n+                return \"\\t\";\n+            }\n+            return ch;\n+        });\n+    }","path":"src/search/FindUtils.js","position":24,"original_position":24,"commit_id":"eec84b83ec5bff9bed58274c5c100a07d86ebeae","original_commit_id":"eec84b83ec5bff9bed58274c5c100a07d86ebeae","user":{"login":"redmunds","id":1197144,"avatar_url":"https://avatars.githubusercontent.com/u/1197144?v=3","gravatar_id":"","url":"https://api.github.com/users/redmunds","html_url":"https://github.com/redmunds","followers_url":"https://api.github.com/users/redmunds/followers","following_url":"https://api.github.com/users/redmunds/following{/other_user}","gists_url":"https://api.github.com/users/redmunds/gists{/gist_id}","starred_url":"https://api.github.com/users/redmunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redmunds/subscriptions","organizations_url":"https://api.github.com/users/redmunds/orgs","repos_url":"https://api.github.com/users/redmunds/repos","events_url":"https://api.github.com/users/redmunds/events{/privacy}","received_events_url":"https://api.github.com/users/redmunds/received_events","type":"User","site_admin":false},"body":"@ficristo This is an awesome improvement!\r\n\r\nI think the name `parseString()` is too generic, though. Maybe `regexUnescapeString()` ?\r\n\r\nDoes this need to detect when the backslash itself escaped so that you can (for example) use \"\\\\n\" to insert \"\\n\" (i.e. not a newline)? Either way, that would be a good unit test.\r\n","created_at":"2016-02-01T17:21:55Z","updated_at":"2016-02-01T17:21:55Z","html_url":"https://github.com/adobe/brackets/pull/11614#discussion_r51449000","pull_request_url":"https://api.github.com/repos/adobe/brackets/pulls/11614","_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments/51449000"},"html":{"href":"https://github.com/adobe/brackets/pull/11614#discussion_r51449000"},"pull_request":{"href":"https://api.github.com/repos/adobe/brackets/pulls/11614"}}},"pull_request":{"url":"https://api.github.com/repos/adobe/brackets/pulls/11614","id":43045613,"html_url":"https://github.com/adobe/brackets/pull/11614","diff_url":"https://github.com/adobe/brackets/pull/11614.diff","patch_url":"https://github.com/adobe/brackets/pull/11614.patch","issue_url":"https://api.github.com/repos/adobe/brackets/issues/11614","number":11614,"state":"open","locked":false,"title":"Added new line and tab as replacement in case of regex search","user":{"login":"ficristo","id":10583268,"avatar_url":"https://avatars.githubusercontent.com/u/10583268?v=3","gravatar_id":"","url":"https://api.github.com/users/ficristo","html_url":"https://github.com/ficristo","followers_url":"https://api.github.com/users/ficristo/followers","following_url":"https://api.github.com/users/ficristo/following{/other_user}","gists_url":"https://api.github.com/users/ficristo/gists{/gist_id}","starred_url":"https://api.github.com/users/ficristo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ficristo/subscriptions","organizations_url":"https://api.github.com/users/ficristo/orgs","repos_url":"https://api.github.com/users/ficristo/repos","events_url":"https://api.github.com/users/ficristo/events{/privacy}","received_events_url":"https://api.github.com/users/ficristo/received_events","type":"User","site_admin":false},"body":"This should fix #11611.\r\nThe idea comes from https://github.com/codemirror/CodeMirror/issues/3456 since Brackets do not use the search addon.","created_at":"2015-08-21T14:48:01Z","updated_at":"2016-02-01T17:21:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76237b1c2d9d2986c5aff7698b0465e302337bd9","assignee":null,"milestone":{"url":"https://api.github.com/repos/adobe/brackets/milestones/39","html_url":"https://github.com/adobe/brackets/milestones/Release%201.7","labels_url":"https://api.github.com/repos/adobe/brackets/milestones/39/labels","id":1486437,"number":39,"title":"Release 1.7","description":"","creator":{"login":"abose","id":5336369,"avatar_url":"https://avatars.githubusercontent.com/u/5336369?v=3","gravatar_id":"","url":"https://api.github.com/users/abose","html_url":"https://github.com/abose","followers_url":"https://api.github.com/users/abose/followers","following_url":"https://api.github.com/users/abose/following{/other_user}","gists_url":"https://api.github.com/users/abose/gists{/gist_id}","starred_url":"https://api.github.com/users/abose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abose/subscriptions","organizations_url":"https://api.github.com/users/abose/orgs","repos_url":"https://api.github.com/users/abose/repos","events_url":"https://api.github.com/users/abose/events{/privacy}","received_events_url":"https://api.github.com/users/abose/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":0,"state":"open","created_at":"2016-01-06T04:11:53Z","updated_at":"2016-02-01T05:11:37Z","due_on":"2016-02-29T18:30:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/adobe/brackets/pulls/11614/commits","review_comments_url":"https://api.github.com/repos/adobe/brackets/pulls/11614/comments","review_comment_url":"https://api.github.com/repos/adobe/brackets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adobe/brackets/issues/11614/comments","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/eec84b83ec5bff9bed58274c5c100a07d86ebeae","head":{"label":"ficristo:regex-replacement","ref":"regex-replacement","sha":"eec84b83ec5bff9bed58274c5c100a07d86ebeae","user":{"login":"ficristo","id":10583268,"avatar_url":"https://avatars.githubusercontent.com/u/10583268?v=3","gravatar_id":"","url":"https://api.github.com/users/ficristo","html_url":"https://github.com/ficristo","followers_url":"https://api.github.com/users/ficristo/followers","following_url":"https://api.github.com/users/ficristo/following{/other_user}","gists_url":"https://api.github.com/users/ficristo/gists{/gist_id}","starred_url":"https://api.github.com/users/ficristo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ficristo/subscriptions","organizations_url":"https://api.github.com/users/ficristo/orgs","repos_url":"https://api.github.com/users/ficristo/repos","events_url":"https://api.github.com/users/ficristo/events{/privacy}","received_events_url":"https://api.github.com/users/ficristo/received_events","type":"User","site_admin":false},"repo":{"id":29439052,"name":"brackets","full_name":"ficristo/brackets","owner":{"login":"ficristo","id":10583268,"avatar_url":"https://avatars.githubusercontent.com/u/10583268?v=3","gravatar_id":"","url":"https://api.github.com/users/ficristo","html_url":"https://github.com/ficristo","followers_url":"https://api.github.com/users/ficristo/followers","following_url":"https://api.github.com/users/ficristo/following{/other_user}","gists_url":"https://api.github.com/users/ficristo/gists{/gist_id}","starred_url":"https://api.github.com/users/ficristo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ficristo/subscriptions","organizations_url":"https://api.github.com/users/ficristo/orgs","repos_url":"https://api.github.com/users/ficristo/repos","events_url":"https://api.github.com/users/ficristo/events{/privacy}","received_events_url":"https://api.github.com/users/ficristo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ficristo/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":true,"url":"https://api.github.com/repos/ficristo/brackets","forks_url":"https://api.github.com/repos/ficristo/brackets/forks","keys_url":"https://api.github.com/repos/ficristo/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ficristo/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ficristo/brackets/teams","hooks_url":"https://api.github.com/repos/ficristo/brackets/hooks","issue_events_url":"https://api.github.com/repos/ficristo/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/ficristo/brackets/events","assignees_url":"https://api.github.com/repos/ficristo/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/ficristo/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/ficristo/brackets/tags","blobs_url":"https://api.github.com/repos/ficristo/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ficristo/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ficristo/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/ficristo/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ficristo/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/ficristo/brackets/languages","stargazers_url":"https://api.github.com/repos/ficristo/brackets/stargazers","contributors_url":"https://api.github.com/repos/ficristo/brackets/contributors","subscribers_url":"https://api.github.com/repos/ficristo/brackets/subscribers","subscription_url":"https://api.github.com/repos/ficristo/brackets/subscription","commits_url":"https://api.github.com/repos/ficristo/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/ficristo/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/ficristo/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/ficristo/brackets/issues/comments{/number}","contents_url":"https://api.github.com/repos/ficristo/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/ficristo/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ficristo/brackets/merges","archive_url":"https://api.github.com/repos/ficristo/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ficristo/brackets/downloads","issues_url":"https://api.github.com/repos/ficristo/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/ficristo/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/ficristo/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/ficristo/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ficristo/brackets/labels{/name}","releases_url":"https://api.github.com/repos/ficristo/brackets/releases{/id}","deployments_url":"https://api.github.com/repos/ficristo/brackets/deployments","created_at":"2015-01-18T20:03:15Z","updated_at":"2015-01-18T20:03:29Z","pushed_at":"2016-01-29T18:16:14Z","git_url":"git://github.com/ficristo/brackets.git","ssh_url":"git@github.com:ficristo/brackets.git","clone_url":"https://github.com/ficristo/brackets.git","svn_url":"https://github.com/ficristo/brackets","homepage":"http://brackets.io","size":81418,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"adobe:master","ref":"master","sha":"bf22bf5845e40d13e111ad7254d61abac956e0da","user":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"repo":{"id":2935735,"name":"brackets","full_name":"adobe/brackets","owner":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":false,"url":"https://api.github.com/repos/adobe/brackets","forks_url":"https://api.github.com/repos/adobe/brackets/forks","keys_url":"https://api.github.com/repos/adobe/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe/brackets/teams","hooks_url":"https://api.github.com/repos/adobe/brackets/hooks","issue_events_url":"https://api.github.com/repos/adobe/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/adobe/brackets/events","assignees_url":"https://api.github.com/repos/adobe/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/adobe/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/adobe/brackets/tags","blobs_url":"https://api.github.com/repos/adobe/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe/brackets/languages","stargazers_url":"https://api.github.com/repos/adobe/brackets/stargazers","contributors_url":"https://api.github.com/repos/adobe/brackets/contributors","subscribers_url":"https://api.github.com/repos/adobe/brackets/subscribers","subscription_url":"https://api.github.com/repos/adobe/brackets/subscription","commits_url":"https://api.github.com/repos/adobe/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe/brackets/issues/comments{/number}","contents_url":"https://api.github.com/repos/adobe/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/adobe/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe/brackets/merges","archive_url":"https://api.github.com/repos/adobe/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe/brackets/downloads","issues_url":"https://api.github.com/repos/adobe/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/adobe/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe/brackets/labels{/name}","releases_url":"https://api.github.com/repos/adobe/brackets/releases{/id}","deployments_url":"https://api.github.com/repos/adobe/brackets/deployments","created_at":"2011-12-07T21:14:40Z","updated_at":"2016-02-01T17:20:50Z","pushed_at":"2016-02-01T15:29:24Z","git_url":"git://github.com/adobe/brackets.git","ssh_url":"git@github.com:adobe/brackets.git","clone_url":"https://github.com/adobe/brackets.git","svn_url":"https://github.com/adobe/brackets","homepage":"http://brackets.io","size":204580,"stargazers_count":24556,"watchers_count":24556,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5159,"mirror_url":null,"open_issues_count":1758,"forks":5159,"open_issues":1758,"watchers":24556,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/11614"},"html":{"href":"https://github.com/adobe/brackets/pull/11614"},"issue":{"href":"https://api.github.com/repos/adobe/brackets/issues/11614"},"comments":{"href":"https://api.github.com/repos/adobe/brackets/issues/11614/comments"},"review_comments":{"href":"https://api.github.com/repos/adobe/brackets/pulls/11614/comments"},"review_comment":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adobe/brackets/pulls/11614/commits"},"statuses":{"href":"https://api.github.com/repos/adobe/brackets/statuses/eec84b83ec5bff9bed58274c5c100a07d86ebeae"}}}}