From 4484c82b1becc2fe5ab7b6842b3419b16c523445 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 28 Jun 2017 01:47:51 -0400 Subject: PLT-6799 Removed tags from markdown links (#6766) * PLT-6799 Removed tags from markdown links * Fixed unit tests --- webapp/utils/text_formatting.jsx | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'webapp/utils/text_formatting.jsx') diff --git a/webapp/utils/text_formatting.jsx b/webapp/utils/text_formatting.jsx index 5cae81f4e..33cc3242c 100644 --- a/webapp/utils/text_formatting.jsx +++ b/webapp/utils/text_formatting.jsx @@ -53,11 +53,6 @@ export function formatText(text, inputOptions) { output = replaceNewlines(output); } - // Add tags to recommend line breaking on slashes within URLs - if (!options.singleline) { - output = insertLongLinkWbr(output); - } - return output; } @@ -477,10 +472,3 @@ export function replaceTokens(text, tokens) { function replaceNewlines(text) { return text.replace(/\n/g, ' '); } - -//replace all "/" inside tags to "/" -function insertLongLinkWbr(test) { - return test.replace(/\//g, (match, position, string) => { - return match + ((/a[^>]*>[^<]*$/).test(string.substr(0, position)) ? '' : ''); - }); -} -- cgit v1.2.3-1-g7c22