diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-18 11:19:10 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-18 11:19:10 +0200 |
commit | 53055a1124cbc2eaeeeeef21b19b0b46e96f23c5 (patch) | |
tree | d761c9928d2568937fad9a2316f7ad2b8b223f07 /client/src/app/videos/shared | |
parent | 4d089429fe91ab7793b9b05010acb483d61345de (diff) | |
download | PeerTube-53055a1124cbc2eaeeeeef21b19b0b46e96f23c5.tar.gz PeerTube-53055a1124cbc2eaeeeeef21b19b0b46e96f23c5.tar.zst PeerTube-53055a1124cbc2eaeeeeef21b19b0b46e96f23c5.zip |
Handle markdown in account/video channel pages
Diffstat (limited to 'client/src/app/videos/shared')
-rw-r--r-- | client/src/app/videos/shared/markdown.service.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/videos/shared/markdown.service.ts b/client/src/app/videos/shared/markdown.service.ts index 681140087..14eeba777 100644 --- a/client/src/app/videos/shared/markdown.service.ts +++ b/client/src/app/videos/shared/markdown.service.ts | |||
@@ -23,14 +23,16 @@ export class MarkdownService { | |||
23 | } | 23 | } |
24 | 24 | ||
25 | textMarkdownToHTML (markdown: string) { | 25 | textMarkdownToHTML (markdown: string) { |
26 | const html = this.textMarkdownIt.render(markdown) | 26 | if (!markdown) return '' |
27 | 27 | ||
28 | const html = this.textMarkdownIt.render(markdown) | ||
28 | return this.avoidTruncatedLinks(html) | 29 | return this.avoidTruncatedLinks(html) |
29 | } | 30 | } |
30 | 31 | ||
31 | enhancedMarkdownToHTML (markdown: string) { | 32 | enhancedMarkdownToHTML (markdown: string) { |
32 | const html = this.enhancedMarkdownIt.render(markdown) | 33 | if (!markdown) return '' |
33 | 34 | ||
35 | const html = this.enhancedMarkdownIt.render(markdown) | ||
34 | return this.avoidTruncatedLinks(html) | 36 | return this.avoidTruncatedLinks(html) |
35 | } | 37 | } |
36 | 38 | ||