diff --git a/static/js/recent_topics.js b/static/js/recent_topics.js index 16f6697448..36507b95f3 100644 --- a/static/js/recent_topics.js +++ b/static/js/recent_topics.js @@ -149,7 +149,7 @@ function topic_in_search_results(keyword, stream, topic) { // split the search text around whitespace(s). // eg: "Denamark recent" -> ["Denamrk", "recent"] const search_keywords = $.trim(keyword).split(/\s+/); - // turn the search keywords into word boundry groups + // turn the search keywords into word boundary groups // eg: ["Denamrk", "recent"] -> "^(?=.*\bDenmark\b)(?=.*\brecent\b).*$" const val = '^(?=.*\\b' + search_keywords.join('\\b)(?=.*\\b') + ').*$'; const reg = RegExp(val, 'i'); // i for ignorecase