From 78bc7a326feb9be7eaff312d5d7fcb7634c6aa5b Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Thu, 18 Jun 2015 17:39:12 -0400 Subject: fixes br tags causing new lines --- web/react/utils/utils.jsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index e57088614..fb4f3a34e 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -366,9 +366,6 @@ module.exports.textToJsx = function(text, options) { if (options && options['singleline']) { var repRegex = new RegExp("\n", "g"); text = text.replace(repRegex, " "); - } else { - var repRegex = new RegExp("\n", "g"); - text = text.replace(repRegex, "
"); } var searchTerm = "" @@ -392,7 +389,7 @@ module.exports.textToJsx = function(text, options) { implicitKeywords[keywordArray[i]] = true; } - var lines = text.split("
"); + var lines = text.split("\n"); var urlMatcher = new LinkifyIt(); for (var i = 0; i < lines.length; i++) { var line = lines[i]; -- cgit v1.2.3-1-g7c22