From f548e0ffb9a6b956b9732ae1ceab58a54b03d203 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 7 Oct 2015 17:13:55 -0700 Subject: PLT-567 auto join open channels --- web/react/utils/markdown.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'web/react') diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx index 7e88f8644..074d36b4b 100644 --- a/web/react/utils/markdown.jsx +++ b/web/react/utils/markdown.jsx @@ -2,6 +2,7 @@ // See License.txt for license information. const TextFormatting = require('./text_formatting.jsx'); +const Utils = require('./utils.jsx'); const marked = require('marked'); @@ -39,7 +40,14 @@ export class MattermostMarkdownRenderer extends marked.Renderer { if (title) { output += ' title="' + title + '"'; } - output += ' target="_blank">' + text + ''; + + if (outHref.indexOf(Utils.getTeamURLFromAddressBar()) === 0) { + output += '>'; + } else { + output += ' target="_blank">'; + } + + output += text + ''; return output; } -- cgit v1.2.3-1-g7c22