Browse Source

preserve line breaks

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
tags/v13.0.0beta1
Arthur Schiwon 6 years ago
parent
commit
61db8615f4
No account linked to committer's email address
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      apps/comments/js/commentstabview.js

+ 10
- 0
apps/comments/js/commentstabview.js View File

@@ -587,6 +587,16 @@
$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();
},


Loading…
Cancel
Save