Fix markdown links truncating
authorChocobozzz <me@florianbigard.com>
Thu, 7 Jun 2018 08:32:50 +0000 (10:32 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 7 Jun 2018 08:32:50 +0000 (10:32 +0200)
client/src/app/videos/shared/markdown.service.ts
client/src/assets/player/peertube-player.ts

index dd8ff20d83181b635eaf4c2725e9c272b11de6d3..9a36786b5b9a232bd389c40b53af4d8227dc3d43 100644 (file)
@@ -68,7 +68,8 @@ export class MarkdownService {
     }
   }
 
-  private avoidTruncatedLinks (html) {
-    return html.replace(/<a[^>]+>([^<]+)<\/a>\s*...(<\/p>)?$/mi, '$1...')
+  private avoidTruncatedLinks (html: string) {
+    console.log(html)
+    return html.replace(/<a[^>]+>([^<]+)<\/a>\s*...((<\/p>)|(<\/li>)|(<\/strong>))?$/mi, '$1...')
   }
 }
index 1707f34f0e3d499aee3092affc4efc7d8976f102..eb75091de24ede24127e8dff4258351723228b02 100644 (file)
@@ -113,8 +113,6 @@ function getControlBarChildren (options: {
 }
 
 function addContextMenu (player: any, videoEmbedUrl: string) {
-  console.log(videoEmbedUrl)
-
   player.contextmenuUI({
     content: [
       {