diff options
author | kimsible <kimsible@users.noreply.github.com> | 2020-11-06 22:37:01 +0100 |
---|---|---|
committer | Rigel Kent <par@rigelk.eu> | 2020-11-08 16:44:43 +0100 |
commit | 110d463fece85e87a26aca48a6048ae0017a27b3 (patch) | |
tree | 1d1b982a557d3ef52f065b4de12f9bc6969731e1 /client/src/app/+videos/+video-watch/comment/video-comment.component.ts | |
parent | f34cc2a48e534c96598490e1d13e426f05b63d0f (diff) | |
download | PeerTube-110d463fece85e87a26aca48a6048ae0017a27b3.tar.gz PeerTube-110d463fece85e87a26aca48a6048ae0017a27b3.tar.zst PeerTube-110d463fece85e87a26aca48a6048ae0017a27b3.zip |
Restore line feed for markdown lists support in comments
Diffstat (limited to 'client/src/app/+videos/+video-watch/comment/video-comment.component.ts')
-rw-r--r-- | client/src/app/+videos/+video-watch/comment/video-comment.component.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment.component.ts b/client/src/app/+videos/+video-watch/comment/video-comment.component.ts index ac2a71aa6..3b3a5cc81 100644 --- a/client/src/app/+videos/+video-watch/comment/video-comment.component.ts +++ b/client/src/app/+videos/+video-watch/comment/video-comment.component.ts | |||
@@ -153,7 +153,9 @@ export class VideoCommentComponent implements OnInit, OnChanges { | |||
153 | } | 153 | } |
154 | 154 | ||
155 | private async init () { | 155 | private async init () { |
156 | const html = await this.markdownService.textMarkdownToHTML(this.comment.text, true, true) | 156 | // Before HTML rendering restore line feed for markdown list compatibility |
157 | const commentText = this.comment.text.replace(/<br.?\/?>/g, '\r\n') | ||
158 | const html = await this.markdownService.textMarkdownToHTML(commentText, true, true) | ||
157 | this.sanitizedCommentHTML = await this.markdownService.processVideoTimestamps(html) | 159 | this.sanitizedCommentHTML = await this.markdownService.processVideoTimestamps(html) |
158 | this.newParentComments = this.parentComments.concat([ this.comment ]) | 160 | this.newParentComments = this.parentComments.concat([ this.comment ]) |
159 | 161 | ||