preserve line breaks
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
76c803f0af
commit
61db8615f4
|
@ -587,6 +587,16 @@
|
||||||
$inserted.html('@' + $this.find('.avatar').data('username'));
|
$inserted.html('@' + $this.find('.avatar').data('username'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var oldHtml;
|
||||||
|
var html = $comment.html();
|
||||||
|
do {
|
||||||
|
// replace works one by one
|
||||||
|
oldHtml = html;
|
||||||
|
html = oldHtml.replace("<br>", "\n"); // preserve line breaks
|
||||||
|
console.warn(html)
|
||||||
|
} while(oldHtml !== html);
|
||||||
|
$comment.html(html);
|
||||||
|
|
||||||
return $comment.text();
|
return $comment.text();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue