diff --git a/client/js/lounge.js b/client/js/lounge.js index 23e8dd5e..ec937737 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -48,10 +48,12 @@ $(function() { const emojiSearchTerms = Object.keys(emojiMap); const emojiStrategy = { id: "emoji", - match: /\B:([-+\w]*):?$/, + match: /\B:([-+\w:?]{2,}):?$/, search(term, callback) { const results = fuzzy.filter( - term, + // Trim colon from the matched term, + // as we are unable to get a clean string from match regex + term.replace(/:$/, ""), emojiSearchTerms, { pre: "",