summaryrefslogtreecommitdiff
path: root/lib/rdoc/generator/template/json_index/js/searcher.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/generator/template/json_index/js/searcher.js')
-rw-r--r--lib/rdoc/generator/template/json_index/js/searcher.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rdoc/generator/template/json_index/js/searcher.js b/lib/rdoc/generator/template/json_index/js/searcher.js
index b3b1c58a0f..e200a168b0 100644
--- a/lib/rdoc/generator/template/json_index/js/searcher.js
+++ b/lib/rdoc/generator/template/json_index/js/searcher.js
@@ -51,20 +51,20 @@ Searcher.prototype = new function() {
/* ----- Utilities ------ */
function splitQuery(query) {
- return jQuery.grep(query.split(/(\s+|::?|\(\)?)/), function(string) {
+ return query.split(/(\s+|::?|\(\)?)/).filter(function(string) {
return string.match(/\S/);
});
}
function buildRegexps(queries) {
- return jQuery.map(queries, function(query) {
+ return queries.map(function(query) {
return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i');
});
}
function buildHilighters(queries) {
- return jQuery.map(queries, function(query) {
- return jQuery.map(query.split(''), function(l, i) {
+ return queries.map(function(query) {
+ return query.split('').map(function(l, i) {
return '\u0001$' + (i*2+1) + '\u0002$' + (i*2+2);
}).join('');
});
@@ -221,9 +221,9 @@ Searcher.prototype = new function() {
}
function triggerResults(results, isLast) {
- jQuery.each(this.handlers, function(i, fn) {
+ this.handlers.forEach(function(fn) {
fn.call(this, results, isLast)
- })
+ });
}
}