Skip to content

Commit

Permalink
chore: bump marked from 2.0.0 to 4.0.10 (#7211)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz committed Jan 17, 2022
1 parent 3bcd343 commit 69c6258
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"less-vars-to-js": "^1.3.0",
"lint-staged": "^10.5.3",
"lodash.debounce": "^4.0.8",
"marked": "^2.0.0",
"marked": "^4.0.10",
"minimist": "^1.2.5",
"monaco-editor": "^0.21.2",
"ng-packagr": "^13.0.3",
Expand Down
4 changes: 2 additions & 2 deletions scripts/site/utils/generate-docs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const MD = require('marked');
const { parse } = require('marked');
const getMeta = require('./get-meta');
const angularNonBindAble = require('./angular-nonbindable');
const fs = require('fs');
Expand Down Expand Up @@ -56,7 +56,7 @@ function baseInfo(file, path) {
return {
meta : meta,
path : path,
content: MD(content),
content: parse(content),
raw : content
}
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/site/utils/get-meta.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const YFM = require('yaml-front-matter');
const MD = require('marked');
const {parse} = require('marked');
const parse5 = require('parse5');

/**
Expand All @@ -22,7 +22,7 @@ function findNodeByName(fragment, name, result = []) {

module.exports = function getMeta(file) {
const meta = YFM.loadFront(file);
const content = MD(meta.__content);
const content = parse(meta.__content);
const fragment = parse5.parseFragment(content);
const paragraphs = [];
findNodeByName(fragment, ['p', 'li'], paragraphs);
Expand Down
6 changes: 3 additions & 3 deletions scripts/site/utils/parse-demo-md.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const MD = require('./marked');
const { parse } = require('./marked');
const YFM = require('yaml-front-matter');
const angularNonBindAble = require('./angular-nonbindable');
module.exports = function parseDemoMd(file) {
Expand All @@ -23,9 +23,9 @@ module.exports = function parseDemoMd(file) {
}
if (!(child.type === 'heading' && child.depth === 2)) {
if (!isAfterENHeading) {
zhPart += MD(remark.stringify(child));
zhPart += parse(remark.stringify(child));
} else {
enPart += MD(remark.stringify(child));
enPart += parse(remark.stringify(child));
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions scripts/site/utils/parse-doc-md.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const MD = require('./marked');
const { parse } = require('./marked');
const getMeta = require('./get-meta');
const angularNonBindAble = require('./angular-nonbindable');

Expand All @@ -22,9 +22,9 @@ module.exports = function parseDocMd(file, path) {
isAfterAPIHeading = true;
}
if (!isAfterAPIHeading) {
firstPart += MD(remark.stringify(child));
firstPart += parse(remark.stringify(child));
} else {
secondPart += MD(remark.stringify(child));
secondPart += parse(remark.stringify(child));
}
}
return {
Expand Down

0 comments on commit 69c6258

Please sign in to comment.