1
0
Fork 0

Fix brackets truncation in video description

This commit is contained in:
Chocobozzz 2019-11-29 10:18:40 +01:00
parent b8f4167fb6
commit f5b72c3937
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

@ -92,7 +92,7 @@ export class MarkdownService {
private avoidTruncatedTags (html: string) {
return html.replace(/\*\*?([^*]+)$/, '$1')
.replace(/<a[^>]+>([^<]+)<\/a>\s*...((<\/p>)|(<\/li>)|(<\/strong>))?$/mi, '$1...')
.replace(/\[[^\]]+\]?\(?([^\)]+)$/, '$1')
.replace(/\[[^\]]+\]\(([^\)]+)$/m, '$1')
.replace(/\s?\[[^\]]+\]?[.]{3}<\/p>$/m, '...</p>')
}
}