diff options
author | George Goldberg <george@gberg.me> | 2017-01-06 13:54:38 +0000 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-01-06 08:54:38 -0500 |
commit | 96697c8cf7561e28010f9df49d208bd79673dfcf (patch) | |
tree | 13c2d10ecd791b75f0729cb7addd0727080e702f /webapp/utils/text_formatting.jsx | |
parent | c3f60d7ced72d274d960088bbf1a5b9ba3a6787b (diff) | |
download | chat-96697c8cf7561e28010f9df49d208bd79673dfcf.tar.gz chat-96697c8cf7561e28010f9df49d208bd79673dfcf.tar.bz2 chat-96697c8cf7561e28010f9df49d208bd79673dfcf.zip |
PLT-4821 Fix highlighting of wildcard search terms. (#4976)
Diffstat (limited to 'webapp/utils/text_formatting.jsx')
-rw-r--r-- | webapp/utils/text_formatting.jsx | 8 |
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; } |