summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-01-06 13:54:38 +0000
committerJoram Wilander <jwawilander@gmail.com>2017-01-06 08:54:38 -0500
commit96697c8cf7561e28010f9df49d208bd79673dfcf (patch)
tree13c2d10ecd791b75f0729cb7addd0727080e702f /webapp
parentc3f60d7ced72d274d960088bbf1a5b9ba3a6787b (diff)
downloadchat-96697c8cf7561e28010f9df49d208bd79673dfcf.tar.gz
chat-96697c8cf7561e28010f9df49d208bd79673dfcf.tar.bz2
chat-96697c8cf7561e28010f9df49d208bd79673dfcf.zip
PLT-4821 Fix highlighting of wildcard search terms. (#4976)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/utils/text_formatting.jsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/webapp/utils/text_formatting.jsx b/webapp/utils/text_formatting.jsx
index a18dd8627..171226558 100644
--- a/webapp/utils/text_formatting.jsx
+++ b/webapp/utils/text_formatting.jsx
@@ -395,7 +395,13 @@ function parseSearchTerms(searchTerm) {
}
// remove punctuation from each term
- terms = terms.map((term) => term.replace(puncStart, '').replace(puncEnd, ''));
+ terms = terms.map((term) => {
+ term.replace(puncStart, '');
+ if (term.charAt(term.length - 1) !== '*') {
+ term.replace(puncEnd, '');
+ }
+ return term;
+ });
return terms;
}