diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-11-06 12:06:20 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-11-06 12:06:20 -0500 |
commit | 11d6644c5325a5686824bef7ffc66778f48acf07 (patch) | |
tree | 62e274fd4f1aa39f02316e31d14069f2a373fffb /web/react/utils/markdown.jsx | |
parent | 9f9c8cb62c6b81fe67441cdf113b9a4b4b456066 (diff) | |
download | chat-11d6644c5325a5686824bef7ffc66778f48acf07.tar.gz chat-11d6644c5325a5686824bef7ffc66778f48acf07.tar.bz2 chat-11d6644c5325a5686824bef7ffc66778f48acf07.zip |
Changed markdown text regex to capture whitespace preceeding an underscore
Diffstat (limited to 'web/react/utils/markdown.jsx')
-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 374caf6dc..e293b9c7f 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\/](?=_)|(?=[\\<!\[*`~]|https?:\/\/|www\.|\(| {2,}\n|$))/; // modified version of the regex that allows links starting with www and those surrounded // by parentheses |