summaryrefslogtreecommitdiffstats
path: root/web/react/utils/utils.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-06-25 10:58:46 -0400
committerCorey Hulen <corey@hulen.com>2015-06-25 10:58:46 -0400
commitc1812b0bfc8714ad804c69f76a1da2dc2f631387 (patch)
tree802d9beae884cc94f2614c3b0f53cbe2e2b04b51 /web/react/utils/utils.jsx
parentb33ab3d3e1c259b6394bffdf80fe150c00fad8ec (diff)
parent25338ee95faeacb06f2e88698ee094613d65633f (diff)
downloadchat-c1812b0bfc8714ad804c69f76a1da2dc2f631387.tar.gz
chat-c1812b0bfc8714ad804c69f76a1da2dc2f631387.tar.bz2
chat-c1812b0bfc8714ad804c69f76a1da2dc2f631387.zip
Merge pull request #9 from mattermost/mm-1263
fixes mm-1263 mentions are highlighted properly now
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r--web/react/utils/utils.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index fb4f3a34e..f358f6c05 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -431,7 +431,7 @@ module.exports.textToJsx = function(text, options) {
} else if (trimWord.match(hashRegex)) {
var suffix = word.match(puncEndRegex);
var prefix = word.match(puncStartRegex);
- var mClass = trimWord in implicitKeywords ? mentionClass : "";
+ var mClass = trimWord in implicitKeywords || trimWord.toLowerCase() in implicitKeywords ? mentionClass : "";
if (searchTerm === trimWord.substring(1).toLowerCase() || searchTerm === trimWord.toLowerCase()) {
highlightSearchClass = " search-highlight";
@@ -439,7 +439,7 @@ module.exports.textToJsx = function(text, options) {
inner.push(<span key={word+i+z+"_span"}>{prefix}<a key={word+i+z+"_hash"} className={"theme " + mClass + highlightSearchClass} href="#" onClick={function(value) { return function() { module.exports.searchForTerm(value); } }(trimWord)}>{trimWord}</a>{suffix} </span>);
- } else if (trimWord in implicitKeywords) {
+ } else if (trimWord in implicitKeywords || trimWord.toLowerCase() in implicitKeywords) {
var suffix = word.match(puncEndRegex);
var prefix = word.match(puncStartRegex);