From 7e24890bd37e62ec9992452751c203430cdc3ea4 Mon Sep 17 00:00:00 2001
From: Pat Lathem <patl@codero.com>
Date: Wed, 21 Oct 2015 14:39:33 -0500
Subject: Add a call to doFormatText inside of the markdown paragraph handler

---
 web/react/utils/markdown.jsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'web/react/utils/markdown.jsx')

diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index 2813798d2..04f0bfc98 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -3,6 +3,7 @@
 
 const TextFormatting = require('./text_formatting.jsx');
 const Utils = require('./utils.jsx');
+const Emoticons = require('./emoticons.jsx');
 
 const marked = require('marked');
 
@@ -53,6 +54,8 @@ export class MattermostMarkdownRenderer extends marked.Renderer {
     }
 
     paragraph(text) {
+        text = TextFormatting.doFormatText(text, this.options)
+
         if (this.formattingOptions.singleline) {
             return `<p class="markdown__paragraph-inline">${text}</p>`;
         }
-- 
cgit v1.2.3-1-g7c22


From 9dd7a5e01e08da947b638a9c89c872a28e8f56df Mon Sep 17 00:00:00 2001
From: Pat Lathem <patl@codero.com>
Date: Wed, 21 Oct 2015 14:44:22 -0500
Subject: Remove stray emoticons.jsx import

---
 web/react/utils/markdown.jsx | 1 -
 1 file changed, 1 deletion(-)

(limited to 'web/react/utils/markdown.jsx')

diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index 04f0bfc98..1c3d498a9 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -3,7 +3,6 @@
 
 const TextFormatting = require('./text_formatting.jsx');
 const Utils = require('./utils.jsx');
-const Emoticons = require('./emoticons.jsx');
 
 const marked = require('marked');
 
-- 
cgit v1.2.3-1-g7c22


From 8eb2c0266c562d43805cb5a30a04102c7e728924 Mon Sep 17 00:00:00 2001
From: Pat Lathem <patl@codero.com>
Date: Wed, 21 Oct 2015 14:52:19 -0500
Subject: Missing semicolon

---
 web/react/utils/markdown.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/react/utils/markdown.jsx')

diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index 1c3d498a9..e8e5798bd 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -53,7 +53,7 @@ export class MattermostMarkdownRenderer extends marked.Renderer {
     }
 
     paragraph(text) {
-        text = TextFormatting.doFormatText(text, this.options)
+        text = TextFormatting.doFormatText(text, this.options);
 
         if (this.formattingOptions.singleline) {
             return `<p class="markdown__paragraph-inline">${text}</p>`;
-- 
cgit v1.2.3-1-g7c22


From fba89915ac9a0421a5441cdb23958099467a0a56 Mon Sep 17 00:00:00 2001
From: Pat Lathem <patl@codero.com>
Date: Wed, 21 Oct 2015 15:02:23 -0500
Subject: Pass eslint tests

---
 web/react/utils/markdown.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'web/react/utils/markdown.jsx')

diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index e8e5798bd..1b699bc98 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -53,13 +53,13 @@ export class MattermostMarkdownRenderer extends marked.Renderer {
     }
 
     paragraph(text) {
-        text = TextFormatting.doFormatText(text, this.options);
+        let outText = TextFormatting.doFormatText(text, this.options);
 
         if (this.formattingOptions.singleline) {
-            return `<p class="markdown__paragraph-inline">${text}</p>`;
+            return `<p class="markdown__paragraph-inline">${outText}</p>`;
         }
 
-        return super.paragraph(text);
+        return super.paragraph(outText);
     }
 
     table(header, body) {
-- 
cgit v1.2.3-1-g7c22


From 25e018ece082a8136024b6d0a6c9db46cb113db1 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Thu, 22 Oct 2015 09:47:28 -0400
Subject: Changed markdown renderer to only parse emoticons twice

---
 web/react/utils/markdown.jsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'web/react/utils/markdown.jsx')

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>`;
-- 
cgit v1.2.3-1-g7c22

