summaryrefslogtreecommitdiffstats
path: root/web/react/utils
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-12-08 08:19:08 -0500
committerChristopher Speller <crspeller@gmail.com>2015-12-08 08:19:08 -0500
commit5e4be8b0d43e3fed102b2ecb8d7a21ff2c3b6726 (patch)
tree56d56cd7a4c710127bbd51991aabe8e84421c6a0 /web/react/utils
parentd7df0695e3d8f288ccf7593a6f4bd360bffb20d8 (diff)
parent51b5ffd72b7994eec1d51f8382bcf2acdb6f075b (diff)
downloadchat-5e4be8b0d43e3fed102b2ecb8d7a21ff2c3b6726.tar.gz
chat-5e4be8b0d43e3fed102b2ecb8d7a21ff2c3b6726.tar.bz2
chat-5e4be8b0d43e3fed102b2ecb8d7a21ff2c3b6726.zip
Merge pull request #1639 from hmhealey/plt1063
PLT-1063 Switched marked to forked version
Diffstat (limited to 'web/react/utils')
-rw-r--r--web/react/utils/emoticons.jsx1
-rw-r--r--web/react/utils/markdown.jsx8
2 files changed, 3 insertions, 6 deletions
diff --git a/web/react/utils/emoticons.jsx b/web/react/utils/emoticons.jsx
index ab04936c0..fa5177232 100644
--- a/web/react/utils/emoticons.jsx
+++ b/web/react/utils/emoticons.jsx
@@ -13,7 +13,6 @@ const emoticonPatterns = {
rage: /(^|\s)(:-?[\[@])(?=$|\s)/g, // :@
frowning: /(^|\s)(:-?\()(?=$|\s)/g, // :(
sob: /(^|\s)(:['’]-?\(|:&#x27;\(|:&#39;\()(?=$|\s)/g, // :`(
- kissing_heart: /(^|\s)(:-?\*)(?=$|\s)/g, // :*
pensive: /(^|\s)(:-?\/)(?=$|\s)/g, // :/
confounded: /(^|\s)(:-?s)(?=$|\s)/gi, // :s
flushed: /(^|\s)(:-?\|)(?=$|\s)/g, // :|
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])/;