update marked to latest version

This commit is contained in:
Matt Hill
2022-01-31 15:24:30 -07:00
committed by Keagan McClelland
parent 574539faec
commit 90281dbbd7
3 changed files with 164 additions and 1409 deletions

View File

@@ -1,12 +1,12 @@
import { Pipe, PipeTransform } from '@angular/core'
import * as marked from 'marked'
import { marked } from 'marked'
import * as DOMPurify from 'dompurify'
@Pipe({
name: 'markdown',
})
export class MarkdownPipe implements PipeTransform {
transform (value: any): any {
transform(value: any): any {
if (value && value.length > 0) {
const html = marked(value)
const sanitized = DOMPurify.sanitize(html)