From 144a277a44350af14993d439b3bd9999f75e84e7 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Sat, 19 Sep 2015 11:08:39 -0400
Subject: Cleaned up markdown formatting code and removed debug statements

---
 web/react/utils/markdown.jsx | 8 +++++---
 1 file changed, 5 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 880e41a18..8c63810cd 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -5,10 +5,12 @@ const marked = require('marked');
 
 export class MattermostMarkdownRenderer extends marked.Renderer {
     link(href, title, text) {
-        if (href.lastIndexOf('http', 0) !== 0) {
-            href = `http://${href}`;
+        let outHref = href;
+
+        if (outHref.lastIndexOf('http', 0) !== 0) {
+            outHref = `http://${outHref}`;
         }
 
-        return super.link(href, title, text);
+        return super.link(outHref, title, text);
     }
 }
-- 
cgit v1.2.3-1-g7c22

