diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-10-22 09:47:28 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-10-22 09:47:28 -0400 |
commit | 25e018ece082a8136024b6d0a6c9db46cb113db1 (patch) | |
tree | 6871b6589f5a4e93a588af3564a25df0a7e4725b /web/react/utils/text_formatting.jsx | |
parent | 74402df462a0efa0b015792ee8c77a16dc72bedb (diff) | |
download | chat-25e018ece082a8136024b6d0a6c9db46cb113db1.tar.gz chat-25e018ece082a8136024b6d0a6c9db46cb113db1.tar.bz2 chat-25e018ece082a8136024b6d0a6c9db46cb113db1.zip |
Changed markdown renderer to only parse emoticons twice
Diffstat (limited to 'web/react/utils/text_formatting.jsx')
-rw-r--r-- | web/react/utils/text_formatting.jsx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx index d79aeed68..5c2e68f1e 100644 --- a/web/react/utils/text_formatting.jsx +++ b/web/react/utils/text_formatting.jsx @@ -69,6 +69,15 @@ export function doFormatText(text, options) { return output; } +export function doFormatEmoticons(text) { + const tokens = new Map(); + + let output = Emoticons.handleEmoticons(text, tokens); + output = replaceTokens(output, tokens); + + return output; +} + export function sanitizeHtml(text) { let output = text; |