diff options
author | Corey Hulen <corey@hulen.com> | 2015-06-25 10:58:46 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-06-25 10:58:46 -0400 |
commit | c1812b0bfc8714ad804c69f76a1da2dc2f631387 (patch) | |
tree | 802d9beae884cc94f2614c3b0f53cbe2e2b04b51 /web/react | |
parent | b33ab3d3e1c259b6394bffdf80fe150c00fad8ec (diff) | |
parent | 25338ee95faeacb06f2e88698ee094613d65633f (diff) | |
download | chat-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')
-rw-r--r-- | web/react/utils/utils.jsx | 4 |
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); |