diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-06-18 17:39:12 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-06-18 17:39:12 -0400 |
commit | 9f86db9faa454757550cfb1d705acc672c94609c (patch) | |
tree | 32fcf3414efe0015389b46570cd122a45a5629b9 /web/react/utils | |
parent | d519f678e6d888cbfb06129e31f4ec9eb2a3b64f (diff) | |
download | chat-9f86db9faa454757550cfb1d705acc672c94609c.tar.gz chat-9f86db9faa454757550cfb1d705acc672c94609c.tar.bz2 chat-9f86db9faa454757550cfb1d705acc672c94609c.zip |
fixes br tags causing new lines
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/utils.jsx | 5 |
1 files changed, 1 insertions, 4 deletions
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, "<br>"); } var searchTerm = "" @@ -392,7 +389,7 @@ module.exports.textToJsx = function(text, options) { implicitKeywords[keywordArray[i]] = true; } - var lines = text.split("<br>"); + var lines = text.split("\n"); var urlMatcher = new LinkifyIt(); for (var i = 0; i < lines.length; i++) { var line = lines[i]; |