diff options
Diffstat (limited to 'web/react/utils')
-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 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 |