From 5bcba280c680d66f65088fce9947ef6070e5e941 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Thu, 8 Oct 2015 12:36:01 -0400 Subject: Changed emoticons so that they much be surrounded by whitespace --- web/react/utils/emoticons.jsx | 48 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/emoticons.jsx b/web/react/utils/emoticons.jsx index 3e2a7761e..ae1cfda26 100644 --- a/web/react/utils/emoticons.jsx +++ b/web/react/utils/emoticons.jsx @@ -2,26 +2,26 @@ // See License.txt for license information. const emoticonPatterns = { - smile: /:-?\)/g, // :) - open_mouth: /:o/gi, // :o - scream: /:-o/gi, // :-o - smirk: /:-?]/g, // :] - grinning: /:-?d/gi, // :D - stuck_out_tongue_closed_eyes: /x-d/gi, // x-d - stuck_out_tongue: /:-?p/gi, // :p - rage: /:-?[\[@]/g, // :@ - frowning: /:-?\(/g, // :( - sob: /:['’]-?\(|:'\(/g, // :`( - kissing_heart: /:-?\*/g, // :* - pensive: /:-?\//g, // :/ - confounded: /:-?s/gi, // :s - flushed: /:-?\|/g, // :| - relaxed: /:-?\$/g, // :$ - mask: /:-x/gi, // :-x - heart: /<3|<3/g, // <3 - broken_heart: /<\/3|</3/g, // { // this might look a bit funny, but since the name isn't contained in the actual match // like with the named emoticons, we need to add it in manually - output = output.replace(pattern, (match) => replaceEmoticonWithToken(match, name)); + output = output.replace(pattern, (match, prefix, emoticon, suffix) => replaceEmoticonWithToken(match, prefix, name, suffix)); }); return output; -- cgit v1.2.3-1-g7c22