lib/gitdocs/public/js/search.js in gitdocs-0.4.7 vs lib/gitdocs/public/js/search.js in gitdocs-0.4.8

- old
+ new

@@ -1,8 +1,8 @@ GitDocs.search = { highlight : function(query) { $('.results dl dd').each(function(idx, el) { - var result = $(el).text().replace(query, "<strong>" + query + "</strong>"); + var result = $(el).text().replace(new RegExp(query, 'ig'), function($0) { return"<strong>" + $0 + "</strong>"; }); $(el).html(result); }); } }; \ No newline at end of file