aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-28 16:17:10 +0200
committerChocobozzz <me@florianbigard.com>2018-09-28 16:17:10 +0200
commit8eaa6d62c6c5659dae7db16f3718327df572a91c (patch)
tree512416d1716d9265e92ac0e9759c985b5507957d /client/src/app/videos/shared
parente182430ac70505fa1492748ae43e1922826bf206 (diff)
downloadPeerTube-8eaa6d62c6c5659dae7db16f3718327df572a91c.tar.gz
PeerTube-8eaa6d62c6c5659dae7db16f3718327df572a91c.tar.zst
PeerTube-8eaa6d62c6c5659dae7db16f3718327df572a91c.zip
Fix advanced options in upload form
Diffstat (limited to 'client/src/app/videos/shared')
-rw-r--r--client/src/app/videos/shared/markdown.service.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/videos/shared/markdown.service.ts b/client/src/app/videos/shared/markdown.service.ts
index b302d9052..07017eca5 100644
--- a/client/src/app/videos/shared/markdown.service.ts
+++ b/client/src/app/videos/shared/markdown.service.ts
@@ -26,14 +26,14 @@ export class MarkdownService {
26 if (!markdown) return '' 26 if (!markdown) return ''
27 27
28 const html = this.textMarkdownIt.render(markdown) 28 const html = this.textMarkdownIt.render(markdown)
29 return this.avoidTruncatedLinks(html) 29 return this.avoidTruncatedTags(html)
30 } 30 }
31 31
32 enhancedMarkdownToHTML (markdown: string) { 32 enhancedMarkdownToHTML (markdown: string) {
33 if (!markdown) return '' 33 if (!markdown) return ''
34 34
35 const html = this.enhancedMarkdownIt.render(markdown) 35 const html = this.enhancedMarkdownIt.render(markdown)
36 return this.avoidTruncatedLinks(html) 36 return this.avoidTruncatedTags(html)
37 } 37 }
38 38
39 private createMarkdownIt (rules: string[]) { 39 private createMarkdownIt (rules: string[]) {
@@ -70,7 +70,7 @@ export class MarkdownService {
70 } 70 }
71 } 71 }
72 72
73 private avoidTruncatedLinks (html: string) { 73 private avoidTruncatedTags (html: string) {
74 return html.replace(/\*\*?([^*]+)$/, '$1') 74 return html.replace(/\*\*?([^*]+)$/, '$1')
75 .replace(/<a[^>]+>([^<]+)<\/a>\s*...((<\/p>)|(<\/li>)|(<\/strong>))?$/mi, '$1...') 75 .replace(/<a[^>]+>([^<]+)<\/a>\s*...((<\/p>)|(<\/li>)|(<\/strong>))?$/mi, '$1...')
76 .replace(/\[[^\]]+\]?\(?([^\)]+)$/, '$1') 76 .replace(/\[[^\]]+\]?\(?([^\)]+)$/, '$1')