REFACTOR: Remove `_.reject`

REFACTOR: Remove _.reject

diff --git a/app/assets/javascripts/discourse/app/controllers/full-page-search.js b/app/assets/javascripts/discourse/app/controllers/full-page-search.js
index 4531ce2..fb45871 100644
--- a/app/assets/javascripts/discourse/app/controllers/full-page-search.js
+++ b/app/assets/javascripts/discourse/app/controllers/full-page-search.js
@@ -59,8 +59,10 @@ export default Controller.extend({
     if (!q) {
       return;
     }
-    // remove l which can be used for sorting
-    return _.reject(q.split(/\s+/), t => t === "l").join(" ");
+    return q
+      .split(/\s+/)
+      .filter(t => t !== "l")
+      .join(" ");
   },
 
   @discourseComputed("skip_context", "context")
diff --git a/app/assets/javascripts/discourse/app/lib/highlight-search.js b/app/assets/javascripts/discourse/app/lib/highlight-search.js
index 2eb3f78..f900a90 100644
--- a/app/assets/javascripts/discourse/app/lib/highlight-search.js
+++ b/app/assets/javascripts/discourse/app/lib/highlight-search.js
@@ -7,12 +7,11 @@ export const CLASS_NAME = "search-highlight";
 export default function(elem, term, opts = {}) {
   if (!isEmpty(term)) {
     // special case ignore "l" which is used for magic sorting
-    let words = _.reject(
-      term.match(new RegExp(`${SEARCH_PHRASE_REGEXP}|[^\\s]+`, "g")),
-      t => t === "l"
-    );
+    let words = term
+      .match(new RegExp(`${SEARCH_PHRASE_REGEXP}|[^\\s]+`, "g"))
+      .filter(t => t !== "l")
+      .map(w => w.replace(/^"(.*)"$/, "$1"));
 
-    words = words.map(w => w.replace(/^"(.*)"$/, "$1"));
     const highlightOpts = {};
     if (!opts.defaultClassName) highlightOpts.className = CLASS_NAME;
     highlightHTML(elem, words, highlightOpts);

GitHub sha: 87b3caf9

This commit appears in #10566 which was merged by eviltrout.