Skip to content

Commit f5ad3d2

Browse files
dzsibiKoooooo-7
andauthored
Update marked to 4.2.12 (#1993)
* Update marked to 4.2.12 --------- Co-authored-by: Koy Zhuang <[email protected]>
1 parent f4f21a3 commit f5ad3d2

File tree

5 files changed

+15
-17
lines changed

5 files changed

+15
-17
lines changed

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"*.js": "eslint --fix"
6666
},
6767
"dependencies": {
68-
"marked": "^1.2.9",
68+
"marked": "^4.2.12",
6969
"medium-zoom": "^1.0.8",
7070
"opencollective-postinstall": "^2.0.2",
7171
"prismjs": "^1.29.0",

src/core/global-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import prism from 'prismjs';
2-
import marked from 'marked';
2+
import { marked } from 'marked';
33
import * as util from './util';
44
import * as dom from './util/dom';
55
import { Compiler } from './render/compiler';

src/core/render/compiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import marked from 'marked';
1+
import { marked } from 'marked';
22
import { isAbsolutePath, getPath, getParentPath } from '../router/util';
33
import { isFn, merge, cached, isPrimitive } from '../util/core';
44
import { tree as treeTpl } from './tpl';

src/plugins/search/search.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@ function getAllPaths(router) {
5757

5858
function getTableData(token) {
5959
if (!token.text && token.type === 'table') {
60-
token.cells.unshift(token.header);
61-
token.text = token.cells
62-
.map(function (rows) {
63-
return rows.join(' | ');
64-
})
60+
token.rows.unshift(token.header);
61+
token.text = token.rows
62+
.map(columns => columns.map(r => r.text).join(' | '))
6563
.join(' |\n ');
6664
}
6765
return token.text;

0 commit comments

Comments
 (0)