summaryrefslogtreecommitdiff
path: root/web-ui/app
diff options
context:
space:
mode:
authorAlabĂȘ Duarte <aduarte@thoughtworks.com>2015-02-24 00:36:07 -0300
committerAlabĂȘ Duarte <aduarte@thoughtworks.com>2015-02-24 00:36:07 -0300
commitf8df620a0df4c6bd8f6110067f74a79b3dd5840b (patch)
treeb0155eff7c01863e638ac8a812eed5d9614cd4d4 /web-ui/app
parent9480f4292b8284e411877958b9fb8c1cf9ec6dcf (diff)
#192 - highlights only words that matches with the keywords given
Diffstat (limited to 'web-ui/app')
-rw-r--r--web-ui/app/js/search/results_highlighter.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web-ui/app/js/search/results_highlighter.js b/web-ui/app/js/search/results_highlighter.js
index 4a4a8eca..9109bca4 100644
--- a/web-ui/app/js/search/results_highlighter.js
+++ b/web-ui/app/js/search/results_highlighter.js
@@ -40,7 +40,7 @@ define(
var domIdent = data.where;
if(this.attr.keywords) {
_.each(this.attr.keywords, function (keyword) {
- $(domIdent).highlightRegex(new RegExp(keyword, 'i'), {
+ $(domIdent).highlightRegex(new RegExp('\\b' + keyword, 'i'), {
tagType: 'em',
className: 'search-highlight'
});