summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2015-11-06 13:16:28 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2015-11-06 13:16:28 -0500
commit32069345b55c5b5fcbb7131bc67444b9a386133f (patch)
tree3b4df19a5078630636e93ea165b9fd46bec49b7d /web
parente5b9fb6b95d988c222ddb85ae5e9ae4d4399864a (diff)
parent0239239d29068c7e7d6df65bfeebbc3b7b232d73 (diff)
downloadchat-32069345b55c5b5fcbb7131bc67444b9a386133f.tar.gz
chat-32069345b55c5b5fcbb7131bc67444b9a386133f.tar.bz2
chat-32069345b55c5b5fcbb7131bc67444b9a386133f.zip
Merge pull request #1345 from hmhealey/plt983
PLT-983 Fix _emphasizing_ markdown text when it's not the start of the post
Diffstat (limited to 'web')
-rw-r--r--web/react/utils/markdown.jsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index ee63b8689..946f93078 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -24,7 +24,7 @@ class MattermostInlineLexer extends marked.InlineLexer {
// modified version of the regex that doesn't break up words in snake_case,
// allows for links starting with www, and allows links succounded by parentheses
// the original is /^[\s\S]+?(?=[\\<!\[_*`~]|https?:\/\/| {2,}\n|$)/
- this.rules.text = /^[\s\S]+?(?=[^\w\/]_|[\\<!\[*`~]|https?:\/\/|www\.|\(| {2,}\n|$)/;
+ this.rules.text = /^[\s\S]+?(?:[^\w\/](?=_)|(?=_\W|[\\<!\[*`~]|https?:\/\/|www\.|\(| {2,}\n|$))/;
// modified version of the regex that allows links starting with www and those surrounded
// by parentheses