From cc69c8db39f48b1053c246458541ccc406228711 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 Jun 2018 10:32:50 +0200 Subject: [PATCH] Fix markdown links truncating --- client/src/app/videos/shared/markdown.service.ts | 5 +++-- client/src/assets/player/peertube-player.ts | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/app/videos/shared/markdown.service.ts b/client/src/app/videos/shared/markdown.service.ts index dd8ff20d8..9a36786b5 100644 --- a/client/src/app/videos/shared/markdown.service.ts +++ b/client/src/app/videos/shared/markdown.service.ts @@ -68,7 +68,8 @@ export class MarkdownService { } } - private avoidTruncatedLinks (html) { - return html.replace(/]+>([^<]+)<\/a>\s*...(<\/p>)?$/mi, '$1...') + private avoidTruncatedLinks (html: string) { + console.log(html) + return html.replace(/]+>([^<]+)<\/a>\s*...((<\/p>)|(<\/li>)|(<\/strong>))?$/mi, '$1...') } } diff --git a/client/src/assets/player/peertube-player.ts b/client/src/assets/player/peertube-player.ts index 1707f34f0..eb75091de 100644 --- a/client/src/assets/player/peertube-player.ts +++ b/client/src/assets/player/peertube-player.ts @@ -113,8 +113,6 @@ function getControlBarChildren (options: { } function addContextMenu (player: any, videoEmbedUrl: string) { - console.log(videoEmbedUrl) - player.contextmenuUI({ content: [ {