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

Commit

Permalink
Remove unused argument to highlightMatch()
Browse files Browse the repository at this point in the history
  • Loading branch information
Narciso Jaramillo committed Nov 7, 2012
1 parent dd023d6 commit 7e53828
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/search/QuickOpen.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,12 +719,11 @@ define(function (require, exports, module) {
* If item is a SearchResult generated by stringMatch(), uses its metadata about which string ranges
* matched; else formats the label with no highlighting.
* @param {!string|SearchResult} item
* @param {!string} rawQuery Query without search-mode prefix
* @param {?string} matchClass CSS class for highlighting matched text
* @param {?function(number, string):string} rangeFilter
* @return {!string} bolded, HTML-escaped result
*/
function highlightMatch(item, rawQuery, matchClass, rangeFilter) {
function highlightMatch(item, matchClass, rangeFilter) {
var label = item.label || item;
matchClass = matchClass || "quicksearch-namematch";

Expand Down Expand Up @@ -759,7 +758,7 @@ define(function (require, exports, module) {
function defaultResultsFormatter(item, query) {
query = query.slice(query.indexOf("@") + 1, query.length);

var displayName = highlightMatch(item, query);
var displayName = highlightMatch(item);
return "<li>" + displayName + "</li>";
}

Expand All @@ -773,8 +772,8 @@ define(function (require, exports, module) {
return "";
}
}
var displayName = highlightMatch(item, query, null, fileNameFilter);
var displayPath = highlightMatch(item, query, "quicksearch-pathmatch");
var displayName = highlightMatch(item, null, fileNameFilter);
var displayPath = highlightMatch(item, "quicksearch-pathmatch");

return "<li>" + displayName + "<br /><span class='quick-open-path'>" + displayPath + "</span></li>";
}
Expand Down

0 comments on commit 7e53828

Please sign in to comment.