summaryrefslogtreecommitdiffstats
path: root/web/react/utils/markdown.jsx
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-10-27 11:52:13 -0700
committer=Corey Hulen <corey@hulen.com>2015-10-27 11:52:13 -0700
commita133f82421d2c67ef32b0aae69a6646a14f97dfc (patch)
tree35fe7dcf6b208437111c5d3a843eabf2f4703101 /web/react/utils/markdown.jsx
parente22b9f53034280cd3b730c03520469dca4046484 (diff)
parente0f69060fa462390779dd7b4cf6b67a12c3974ba (diff)
downloadchat-a133f82421d2c67ef32b0aae69a6646a14f97dfc.tar.gz
chat-a133f82421d2c67ef32b0aae69a6646a14f97dfc.tar.bz2
chat-a133f82421d2c67ef32b0aae69a6646a14f97dfc.zip
Merge branch 'master' into PLT-340
Diffstat (limited to 'web/react/utils/markdown.jsx')
-rw-r--r--web/react/utils/markdown.jsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index 01cc309b8..ad11a95ac 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -121,8 +121,11 @@ export class MattermostMarkdownRenderer extends marked.Renderer {
paragraph(text) {
let outText = text;
+ // required so markdown does not strip '_' from @user_names
+ outText = TextFormatting.doFormatMentions(text);
+
if (!('emoticons' in this.options) || this.options.emoticon) {
- outText = TextFormatting.doFormatEmoticons(text);
+ outText = TextFormatting.doFormatEmoticons(outText);
}
if (this.formattingOptions.singleline) {
@@ -136,7 +139,7 @@ export class MattermostMarkdownRenderer extends marked.Renderer {
return `<table class="markdown__table"><thead>${header}</thead><tbody>${body}</tbody></table>`;
}
- text(text) {
- return TextFormatting.doFormatText(text, this.formattingOptions);
+ text(txt) {
+ return TextFormatting.doFormatText(txt, this.formattingOptions);
}
}