From 19a34f312b91bd4575d3035ed5aa54369f392d79 Mon Sep 17 00:00:00 2001 From: nickago Date: Thu, 16 Jul 2015 14:22:15 -0700 Subject: Fixed config on our link parser --- web/react/utils/utils.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'web') diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 19c074606..ec2b7e7e8 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -198,7 +198,13 @@ module.exports.getTimestamp = function() { } var testUrlMatch = function(text) { - var urlMatcher = new Autolinker.matchParser.MatchParser; + var urlMatcher = new Autolinker.matchParser.MatchParser({ + urls: true, + emails: false, + twitter: false, + phone: false, + hashtag: false, + }); var result = []; var replaceFn = function(match) { var linkData = {}; @@ -417,7 +423,6 @@ module.exports.textToJsx = function(text, options) { highlightSearchClass = " search-highlight"; } - if (explicitMention && (UserStore.getProfileByUsername(explicitMention[1]) || Constants.SPECIAL_MENTIONS.indexOf(explicitMention[1]) !== -1)) -- cgit v1.2.3-1-g7c22 From f99743bfa08c8c3c4a5264cf30c814d145a2e90f Mon Sep 17 00:00:00 2001 From: nickago Date: Thu, 16 Jul 2015 14:23:27 -0700 Subject: readded space --- web/react/utils/utils.jsx | 1 + 1 file changed, 1 insertion(+) (limited to 'web') diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index ec2b7e7e8..81de07230 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -423,6 +423,7 @@ module.exports.textToJsx = function(text, options) { highlightSearchClass = " search-highlight"; } + if (explicitMention && (UserStore.getProfileByUsername(explicitMention[1]) || Constants.SPECIAL_MENTIONS.indexOf(explicitMention[1]) !== -1)) -- cgit v1.2.3-1-g7c22 From 5da579cbcc374a67487337c309b189b67c0a788f Mon Sep 17 00:00:00 2001 From: nickago Date: Thu, 16 Jul 2015 14:24:15 -0700 Subject: fixed formatting --- web/react/utils/utils.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web') diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 81de07230..0d84a4983 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -423,7 +423,7 @@ module.exports.textToJsx = function(text, options) { highlightSearchClass = " search-highlight"; } - + if (explicitMention && (UserStore.getProfileByUsername(explicitMention[1]) || Constants.SPECIAL_MENTIONS.indexOf(explicitMention[1]) !== -1)) -- cgit v1.2.3-1-g7c22