Avoid to linkify truncated links
This commit is contained in:
parent
e494f91e67
commit
63c4b44961
1 changed files with 4 additions and 1 deletions
|
@ -35,6 +35,9 @@ export class MarkdownService {
|
|||
}
|
||||
|
||||
markdownToHTML (markdown: string) {
|
||||
return this.markdownIt.render(markdown)
|
||||
const html = this.markdownIt.render(markdown)
|
||||
|
||||
// Avoid linkify truncated links
|
||||
return html.replace(/<a[^>]+>([^<]+)<\/a>\s*...(<\/p>)?$/mi, '$1...')
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue