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 | 78bc7a326feb9be7eaff312d5d7fcb7634c6aa5b (patch) | |
tree | 17ba2e5a65ca7244a97edb250638a1c5de366697 /web/react/utils/utils.jsx | |
parent | 400f55105f0e44183b3d2716917a2bc6de70697c (diff) | |
download | chat-78bc7a326feb9be7eaff312d5d7fcb7634c6aa5b.tar.gz chat-78bc7a326feb9be7eaff312d5d7fcb7634c6aa5b.tar.bz2 chat-78bc7a326feb9be7eaff312d5d7fcb7634c6aa5b.zip |
fixes br tags causing new lines
Diffstat (limited to 'web/react/utils/utils.jsx')
-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]; |