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

File diff suppressed because it is too large Load Diff

View File

@@ -41,7 +41,7 @@
"dompurify": "^2.3.3", "dompurify": "^2.3.3",
"fast-json-patch": "^3.1.0", "fast-json-patch": "^3.1.0",
"fuse.js": "^6.4.6", "fuse.js": "^6.4.6",
"marked": "^3.0.0", "marked": "^4.0.0",
"mustache": "^4.2.0", "mustache": "^4.2.0",
"ng-qrcode": "^6.0.0", "ng-qrcode": "^6.0.0",
"patch-db-client": "file: ../../../patch-db/client", "patch-db-client": "file: ../../../patch-db/client",
@@ -56,17 +56,16 @@
"@angular/cli": "^13.1.4", "@angular/cli": "^13.1.4",
"@angular/compiler-cli": "^13.2.0", "@angular/compiler-cli": "^13.2.0",
"@angular/language-service": "^13.2.0", "@angular/language-service": "^13.2.0",
"@ionic/angular-toolkit": "^4.0.0",
"@ionic/cli": "^6.18.1", "@ionic/cli": "^6.18.1",
"@types/json-pointer": "^1.0.31", "@types/dompurify": "^2.3.3",
"@types/marked": "^3.0.0", "@types/marked": "^4.0.0",
"@types/mustache": "^4.1.2", "@types/mustache": "^4.1.2",
"@types/node": "^16.9.1", "@types/node": "^16.9.1",
"@types/uuid": "^8.3.1", "@types/uuid": "^8.3.1",
"husky": "^4.3.8", "husky": "^4.3.8",
"lint-staged": "^12.1.2", "lint-staged": "^12.1.2",
"ng-packagr": "^13.0.0", "ng-packagr": "^13.0.0",
"node-html-parser": "^4.1.4", "node-html-parser": "^5.0.0",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"ts-node": "^10.4.0", "ts-node": "^10.4.0",

View File

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