diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.css b/src/renderer/components/watch-video-comments/watch-video-comments.css index 3005ff80..73ce59bd 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.css +++ b/src/renderer/components/watch-video-comments/watch-video-comments.css @@ -50,6 +50,7 @@ } .commentText { + white-space: pre-wrap; font-size: 14px; margin-top: -10px; margin-left: 70px; diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.js b/src/renderer/components/watch-video-comments/watch-video-comments.js index 04ccd2ea..b1d85968 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.js +++ b/src/renderer/components/watch-video-comments/watch-video-comments.js @@ -264,7 +264,7 @@ export default Vue.extend({ if (this.hideCommentLikes) { comment.likes = null } - comment.text = autolinker.link(comment.text.replace(/(<([^>]+)>)/ig, '')) + comment.text = autolinker.link(comment.text.replace(/(<(?!br>)([^>]+)>)/ig, '')) return comment }) @@ -296,7 +296,7 @@ export default Vue.extend({ } else { comment.likes = comment.likeCount } - comment.text = autolinker.link(comment.content.replace(/(<([^>]+)>)/ig, '')) + comment.text = autolinker.link(comment.content.replace(/(<(?!br>)([^>]+)>)/ig, '')) comment.dataType = 'invidious' if (typeof (comment.replies) !== 'undefined' && typeof (comment.replies.replyCount) !== 'undefined') { @@ -362,7 +362,7 @@ export default Vue.extend({ } else { comment.likes = comment.likeCount } - comment.text = autolinker.link(comment.content.replace(/(<([^>]+)>)/ig, '')) + comment.text = autolinker.link(comment.content.replace(/(<(?!br>)([^>]+)>)/ig, '')) comment.time = comment.publishedText comment.dataType = 'invidious' comment.numReplies = 0