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/markdown.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/markdown.jsx')
-rw-r--r-- | web/react/utils/markdown.jsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx index 1b699bc98..7a4e70054 100644 --- a/web/react/utils/markdown.jsx +++ b/web/react/utils/markdown.jsx @@ -11,6 +11,7 @@ export class MattermostMarkdownRenderer extends marked.Renderer { super(options); this.heading = this.heading.bind(this); + this.paragraph = this.paragraph.bind(this); this.text = this.text.bind(this); this.formattingOptions = formattingOptions; @@ -53,7 +54,11 @@ export class MattermostMarkdownRenderer extends marked.Renderer { } paragraph(text) { - let outText = TextFormatting.doFormatText(text, this.options); + let outText = text; + + if (!('emoticons' in this.options) || this.options.emoticon) { + outText = TextFormatting.doFormatEmoticons(text); + } if (this.formattingOptions.singleline) { return `<p class="markdown__paragraph-inline">${outText}</p>`; |