diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-31 15:26:48 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-31 15:26:48 +0200 |
commit | 040467f5c8cba429176423d5e4b83bf5379ad101 (patch) | |
tree | 0d81f04cb5072b4588cdee756d715163dc32dd94 /client/src/app/videos/shared | |
parent | cf7a61b5a2b68fd966c4a355e37e84b048ed296b (diff) | |
download | PeerTube-040467f5c8cba429176423d5e4b83bf5379ad101.tar.gz PeerTube-040467f5c8cba429176423d5e4b83bf5379ad101.tar.zst PeerTube-040467f5c8cba429176423d5e4b83bf5379ad101.zip |
Try to handle truncated markdown links
Diffstat (limited to 'client/src/app/videos/shared')
-rw-r--r-- | client/src/app/videos/shared/markdown.service.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/client/src/app/videos/shared/markdown.service.ts b/client/src/app/videos/shared/markdown.service.ts index 14eeba777..3ef16fdb9 100644 --- a/client/src/app/videos/shared/markdown.service.ts +++ b/client/src/app/videos/shared/markdown.service.ts | |||
@@ -72,5 +72,6 @@ export class MarkdownService { | |||
72 | 72 | ||
73 | private avoidTruncatedLinks (html: string) { | 73 | private avoidTruncatedLinks (html: string) { |
74 | return html.replace(/<a[^>]+>([^<]+)<\/a>\s*...((<\/p>)|(<\/li>)|(<\/strong>))?$/mi, '$1...') | 74 | return html.replace(/<a[^>]+>([^<]+)<\/a>\s*...((<\/p>)|(<\/li>)|(<\/strong>))?$/mi, '$1...') |
75 | .replace(/\[[^\]]+\]?\(?([^\)]+)$/, '$1') | ||
75 | } | 76 | } |
76 | } | 77 | } |