From f5b72c3937c721258c569ee783503adb379c42ab Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 29 Nov 2019 10:18:40 +0100 Subject: Fix brackets truncation in video description --- client/src/app/shared/renderer/markdown.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client') 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, '...

') } } -- cgit v1.2.3