aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-watch/comment/video-comments.component.ts
diff options
context:
space:
mode:
authorKimsible <2324615-kimsible@users.noreply.gitlab.com>2020-11-06 17:40:40 +0100
committerRigel Kent <par@rigelk.eu>2020-11-06 18:14:15 +0100
commit6a9498e37cbda01414b8accf3fdcac410f893500 (patch)
tree24fcef83cec2da4acb03002164418ef55d60c7f9 /client/src/app/+videos/+video-watch/comment/video-comments.component.ts
parent61379e431115ab9d7c200852afcccf6ab94064d5 (diff)
downloadPeerTube-6a9498e37cbda01414b8accf3fdcac410f893500.tar.gz
PeerTube-6a9498e37cbda01414b8accf3fdcac410f893500.tar.zst
PeerTube-6a9498e37cbda01414b8accf3fdcac410f893500.zip
Correct break line display for re-draft comments
Diffstat (limited to 'client/src/app/+videos/+video-watch/comment/video-comments.component.ts')
-rw-r--r--client/src/app/+videos/+video-watch/comment/video-comments.component.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/app/+videos/+video-watch/comment/video-comments.component.ts b/client/src/app/+videos/+video-watch/comment/video-comments.component.ts
index 79627b1af..602bd8050 100644
--- a/client/src/app/+videos/+video-watch/comment/video-comments.component.ts
+++ b/client/src/app/+videos/+video-watch/comment/video-comments.component.ts
@@ -199,10 +199,13 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
199 if (confirm) { 199 if (confirm) {
200 this.inReplyToCommentId = commentToRedraft.inReplyToCommentId 200 this.inReplyToCommentId = commentToRedraft.inReplyToCommentId
201 201
202 // Display <br /> tag as a break line for editing
203 const commentToRedraftText = commentToRedraft.text.replace(/<br.?\/?>/g, '\r\n')
204
202 if (commentToRedraft.threadId === commentToRedraft.id) { 205 if (commentToRedraft.threadId === commentToRedraft.id) {
203 this.commentThreadRedraftValue = commentToRedraft.text 206 this.commentThreadRedraftValue = commentToRedraftText
204 } else { 207 } else {
205 this.commentReplyRedraftValue = commentToRedraft.text 208 this.commentReplyRedraftValue = commentToRedraftText
206 } 209 }
207 210
208 } 211 }