Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1723)

Unified Diff: Source/devtools/front_end/workspace/SearchConfig.js

Issue 663083003: DevTools: Support f: style file filters in search as well as file: (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/workspace/SearchConfig.js
diff --git a/Source/devtools/front_end/workspace/SearchConfig.js b/Source/devtools/front_end/workspace/SearchConfig.js
index b8a6a3668f179b939ffbcc912b6096852b803704..70ac7d677e6bd62a980a90eeba6d34244d6b84e9 100644
--- a/Source/devtools/front_end/workspace/SearchConfig.js
+++ b/Source/devtools/front_end/workspace/SearchConfig.js
@@ -64,11 +64,11 @@ WebInspector.SearchConfig.prototype = {
_parse: function()
{
- var filePattern = "-?file:(([^\\\\ ]|\\\\.)+)"; // After file: prefix: any symbol except space and backslash or any symbol escaped with a backslash.
+ var filePattern = "-?f(ile)?:(([^\\\\ ]|\\\\.)+)"; // After file: prefix: any symbol except space and backslash or any symbol escaped with a backslash.
var quotedPattern = "\"(([^\\\\\"]|\\\\.)+)\""; // Inside double quotes: any symbol except double quote and backslash or any symbol escaped with a backslash.
// A word is a sequence of any symbols except space and backslash or any symbols escaped with a backslash, that does not start with file:.
- var unquotedWordPattern = "((?!-?file:)[^\\\\ ]|\\\\.)+";
+ var unquotedWordPattern = "((?!-?f(ile)?:)[^\\\\ ]|\\\\.)+";
var unquotedPattern = unquotedWordPattern + "( +" + unquotedWordPattern + ")*"; // A word or several words separated by space(s).
var pattern = "(" + filePattern + ")|(" + quotedPattern + ")|(" + unquotedPattern + ")";
@@ -146,7 +146,7 @@ WebInspector.SearchConfig.prototype = {
*/
_parseFileQuery: function(query)
{
- var match = query.match(/^(-)?file:/);
+ var match = query.match(/^(-)?f(ile)?:/);
if (!match)
return null;
var isNegative = !!match[1];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698