summaryrefslogtreecommitdiffstats
path: root/web/react/utils/text_formatting.jsx
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-09-19 10:33:13 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-09-19 10:39:55 -0400
commit2eb320f48a66b42832b758e5fc6700358aef34ed (patch)
treea23b380af7cc82c2330daad6c18153c2966267c3 /web/react/utils/text_formatting.jsx
parentefb3462a683d1f4d88c56327b14256adda11115d (diff)
downloadchat-2eb320f48a66b42832b758e5fc6700358aef34ed.tar.gz
chat-2eb320f48a66b42832b758e5fc6700358aef34ed.tar.bz2
chat-2eb320f48a66b42832b758e5fc6700358aef34ed.zip
Changed markdown link parsing to automatically add an explicit protocol to urls
Diffstat (limited to 'web/react/utils/text_formatting.jsx')
-rw-r--r--web/react/utils/text_formatting.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx
index da0595326..537ddb394 100644
--- a/web/react/utils/text_formatting.jsx
+++ b/web/react/utils/text_formatting.jsx
@@ -3,12 +3,13 @@
const Autolinker = require('autolinker');
const Constants = require('./constants.jsx');
+const Markdown = require('./markdown.jsx');
const UserStore = require('../stores/user_store.jsx');
const Utils = require('./utils.jsx');
const marked = require('marked');
-const markdownRenderer = new marked.Renderer();
+const markdownRenderer = new Markdown.MattermostMarkdownRenderer();
// Performs formatting of user posts including highlighting mentions and search terms and converting urls, hashtags, and
// @mentions to links by taking a user's message and returning a string of formatted html. Also takes a number of options