]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix multiple \n in md to plain text
authorChocobozzz <me@florianbigard.com>
Mon, 11 Oct 2021 12:15:42 +0000 (14:15 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 11 Oct 2021 12:15:42 +0000 (14:15 +0200)
server/helpers/markdown.ts

index 41e57d857badfb6173f9faa56d9cad9eecdfe065..ebf479b98c1c8208f2dbf3ba3234019a29686ca7 100644 (file)
@@ -34,7 +34,7 @@ const mdToPlainText = text => {
 
   return safeHtml.replace(/<[^>]+>/g, '')
                  .replace(/\n$/, '')
-                 .replace('\n', ', ')
+                 .replace(/\n/g, ', ')
 }
 
 // ---------------------------------------------------------------------------