DescriptionAdding regex support to search bar in dev tools console
This patch extends dev tools console search with support for regular
expressions. UI wise I added a checkbox labeled "Regex" after the console
search input field, which toggles regex support when searching and also
triggers the search. When regex is enabled, console search translates the query
string to a standard JavaScript RegExp.
I implemented the regex checkbox by adding a boolean parameter to
WebInspector.SearchableView that determines whether the view should feature
such a checkbox. I'm not 100% sure if this was the best way of doing this,
since it's only relevant to the ConsoleView ATM, but it was the simplest way.
I'm concerned about two empty table cells between the search input field
and the Regex checkbox, but in fairness, these were already present prior to
my changes.
Finally, I'm not sure how to write tests for my changes, even though I'd like to.
BUG=418406
Patch Set 1 #
Total comments: 19
Patch Set 2 : Revision 1 #Patch Set 3 : Clear regex error state when search input is cleared #Patch Set 4 : Implement regex search similar to Sublime Text #
Messages
Total messages: 20 (4 generated)
|