summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-11-06 12:55:14 -0500
committerhmhealey <harrisonmhealey@gmail.com>2015-11-06 12:55:14 -0500
commit0239239d29068c7e7d6df65bfeebbc3b7b232d73 (patch)
tree4d2bf1d5779893af96688a17ac73311665cb4f90
parent11d6644c5325a5686824bef7ffc66778f48acf07 (diff)
downloadchat-0239239d29068c7e7d6df65bfeebbc3b7b232d73.tar.gz
chat-0239239d29068c7e7d6df65bfeebbc3b7b232d73.tar.bz2
chat-0239239d29068c7e7d6df65bfeebbc3b7b232d73.zip
Changed markdown text regex to not capture the final underscore on a word to better match the original behaviour
-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 e293b9c7f..84c63a18b 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