summaryrefslogtreecommitdiffstats
path: root/web/react/utils/text_formatting.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-10-13 08:43:57 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-10-13 08:43:57 -0400
commite67043f4f4012d97089cdb9c5c647ee09d0f34c5 (patch)
tree0dfb9a74731e845239c2dc3c9d978e846f06d29b /web/react/utils/text_formatting.jsx
parentffdeba70ef1ec69233beeb032773c54156359da1 (diff)
parent787d2ef7bca7f411b18d1d13561d61d7e95c81a7 (diff)
downloadchat-e67043f4f4012d97089cdb9c5c647ee09d0f34c5.tar.gz
chat-e67043f4f4012d97089cdb9c5c647ee09d0f34c5.tar.bz2
chat-e67043f4f4012d97089cdb9c5c647ee09d0f34c5.zip
Merge pull request #987 from hmhealey/plt521
PLT-521 Modified markdown lexer to not break up words written in snake_case
Diffstat (limited to 'web/react/utils/text_formatting.jsx')
-rw-r--r--web/react/utils/text_formatting.jsx9
1 files changed, 2 insertions, 7 deletions
diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx
index 2b6e6e14e..6778d341a 100644
--- a/web/react/utils/text_formatting.jsx
+++ b/web/react/utils/text_formatting.jsx
@@ -8,8 +8,6 @@ const Markdown = require('./markdown.jsx');
const UserStore = require('../stores/user_store.jsx');
const Utils = require('./utils.jsx');
-const marked = require('marked');
-
// 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
// as part of the second parameter:
@@ -22,11 +20,8 @@ export function formatText(text, options = {}) {
let output;
if (!('markdown' in options) || options.markdown) {
- // the markdown renderer will call doFormatText as necessary so just call marked
- output = marked(text, {
- renderer: new Markdown.MattermostMarkdownRenderer(null, options),
- sanitize: true
- });
+ // the markdown renderer will call doFormatText as necessary
+ output = Markdown.format(text, options);
} else {
output = sanitizeHtml(text);
output = doFormatText(output, options);