summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-12-07 12:04:08 -0500
committerhmhealey <harrisonmhealey@gmail.com>2015-12-07 14:24:52 -0500
commit51b5ffd72b7994eec1d51f8382bcf2acdb6f075b (patch)
treeb95a893a911d4a1044e61fa1c78abd64e737b5e8
parent65d8e3aeed68a9ada745451f5073310a5e7b1894 (diff)
downloadchat-51b5ffd72b7994eec1d51f8382bcf2acdb6f075b.tar.gz
chat-51b5ffd72b7994eec1d51f8382bcf2acdb6f075b.tar.bz2
chat-51b5ffd72b7994eec1d51f8382bcf2acdb6f075b.zip
Removed special handling of snake_case words since that's now done by marked
-rw-r--r--web/react/utils/markdown.jsx8
1 files changed, 3 insertions, 5 deletions
diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index d600ef069..826b87d08 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -69,13 +69,11 @@ class MattermostInlineLexer extends marked.InlineLexer {
this.rules = Object.assign({}, this.rules);
- // 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
+ // modified version of the regex that allows for links starting with www and those surrounded by parentheses
// the original is /^[\s\S]+?(?=[\\<!\[_*`~]|https?:\/\/| {2,}\n|$)/
- this.rules.text = /^[\s\S]+?(?:[^\w\/](?=_)|(?=_\W|[\\<!\[*`~]|https?:\/\/|www\.|\(| {2,}\n|$))/;
+ this.rules.text = /^[\s\S]+?(?=[\\<!\[_*`~]|https?:\/\/|www\.|\(| {2,}\n|$)/;
- // modified version of the regex that allows links starting with www and those surrounded
- // by parentheses
+ // modified version of the regex that allows links starting with www and those surrounded by parentheses
// the original is /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/
this.rules.url = /^(\(?(?:https?:\/\/|www\.)[^\s<.][^\s<]*[^<.,:;"'\]\s])/;