From: Chocobozzz Date: Fri, 29 Nov 2019 09:18:40 +0000 (+0100) Subject: Fix brackets truncation in video description X-Git-Tag: v2.1.0-rc.1~294 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f5b72c3937c721258c569ee783503adb379c42ab;p=oweals%2Fpeertube.git Fix brackets truncation in video description --- diff --git a/client/src/app/shared/renderer/markdown.service.ts b/client/src/app/shared/renderer/markdown.service.ts index 0e24f3085..9aec3b4bc 100644 --- a/client/src/app/shared/renderer/markdown.service.ts +++ b/client/src/app/shared/renderer/markdown.service.ts @@ -92,7 +92,7 @@ export class MarkdownService { private avoidTruncatedTags (html: string) { return html.replace(/\*\*?([^*]+)$/, '$1') .replace(/]+>([^<]+)<\/a>\s*...((<\/p>)|(<\/li>)|(<\/strong>))?$/mi, '$1...') - .replace(/\[[^\]]+\]?\(?([^\)]+)$/, '$1') - + .replace(/\[[^\]]+\]\(([^\)]+)$/m, '$1') + .replace(/\s?\[[^\]]+\]?[.]{3}<\/p>$/m, '...

') } }