diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-11-06 12:55:14 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-11-06 12:55:14 -0500 |
commit | 0239239d29068c7e7d6df65bfeebbc3b7b232d73 (patch) | |
tree | 4d2bf1d5779893af96688a17ac73311665cb4f90 /web | |
parent | 11d6644c5325a5686824bef7ffc66778f48acf07 (diff) | |
download | chat-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
Diffstat (limited to 'web')
-rw-r--r-- | web/react/utils/markdown.jsx | 2 |
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 |