Update marked to 4.2.12 (#1993)

* Update marked to 4.2.12


---------

Co-authored-by: Koy Zhuang <koy@ko8e24.top>
This commit is contained in:
Bálint József Jánvári 2023-04-22 12:07:21 +02:00 committed by GitHub
parent f4f21a3f74
commit f5ad3d2711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 17 deletions

18
package-lock.json generated
View File

@ -10,7 +10,7 @@
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"marked": "^1.2.9",
"marked": "^4.2.12",
"medium-zoom": "^1.0.8",
"opencollective-postinstall": "^2.0.2",
"prismjs": "^1.29.0",
@ -16253,14 +16253,14 @@
}
},
"node_modules/marked": {
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/marked/-/marked-1.2.9.tgz",
"integrity": "sha512-H8lIX2SvyitGX+TRdtS06m1jHMijKN/XjfH6Ooii9fvxMlh8QdqBfBDkGUpMWH2kQNrtixjzYUa3SH8ROTgRRw==",
"version": "4.2.12",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.12.tgz",
"integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==",
"bin": {
"marked": "bin/marked"
"marked": "bin/marked.js"
},
"engines": {
"node": ">= 8.16.2"
"node": ">= 12"
}
},
"node_modules/mdn-data": {
@ -35781,9 +35781,9 @@
}
},
"marked": {
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/marked/-/marked-1.2.9.tgz",
"integrity": "sha512-H8lIX2SvyitGX+TRdtS06m1jHMijKN/XjfH6Ooii9fvxMlh8QdqBfBDkGUpMWH2kQNrtixjzYUa3SH8ROTgRRw=="
"version": "4.2.12",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.2.12.tgz",
"integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw=="
},
"mdn-data": {
"version": "2.0.4",

View File

@ -65,7 +65,7 @@
"*.js": "eslint --fix"
},
"dependencies": {
"marked": "^1.2.9",
"marked": "^4.2.12",
"medium-zoom": "^1.0.8",
"opencollective-postinstall": "^2.0.2",
"prismjs": "^1.29.0",

View File

@ -1,5 +1,5 @@
import prism from 'prismjs';
import marked from 'marked';
import { marked } from 'marked';
import * as util from './util';
import * as dom from './util/dom';
import { Compiler } from './render/compiler';

View File

@ -1,4 +1,4 @@
import marked from 'marked';
import { marked } from 'marked';
import { isAbsolutePath, getPath, getParentPath } from '../router/util';
import { isFn, merge, cached, isPrimitive } from '../util/core';
import { tree as treeTpl } from './tpl';

View File

@ -57,11 +57,9 @@ function getAllPaths(router) {
function getTableData(token) {
if (!token.text && token.type === 'table') {
token.cells.unshift(token.header);
token.text = token.cells
.map(function (rows) {
return rows.join(' | ');
})
token.rows.unshift(token.header);
token.text = token.rows
.map(columns => columns.map(r => r.text).join(' | '))
.join(' |\n ');
}
return token.text;