From 96697c8cf7561e28010f9df49d208bd79673dfcf Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Fri, 6 Jan 2017 13:54:38 +0000 Subject: PLT-4821 Fix highlighting of wildcard search terms. (#4976) --- webapp/utils/text_formatting.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'webapp/utils') 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; } -- cgit v1.2.3-1-g7c22