fixes br tags causing new lines

Этот коммит содержится в:
JoramWilander
2015-06-18 17:39:12 -04:00
родитель 400f55105f
Коммит 78bc7a326f
2 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@@ -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];