mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 10:29:19 +08:00
chore: 更新 marked 修复安全 alert (#3422)
This commit is contained in:
parent
72f0f52c6c
commit
b176fefe6f
@ -154,7 +154,7 @@
|
||||
"js-yaml": "^4.1.0",
|
||||
"json5": "^2.2.0",
|
||||
"lint-staged": "^12.1.4",
|
||||
"marked": "^3.0.4",
|
||||
"marked": ">=4.0.10",
|
||||
"mkdirp": "^1.0.4",
|
||||
"moment-timezone": "^0.5.33",
|
||||
"path-to-regexp": "^6.2.0",
|
||||
|
@ -197,9 +197,11 @@ module.exports = function (content, file) {
|
||||
}
|
||||
);
|
||||
|
||||
content = marked(content).replace(/<p>\[\[(\d+)\]\]<\/p>/g, function (_, id) {
|
||||
return placeholder[id] || '';
|
||||
});
|
||||
content = marked
|
||||
.parse(content)
|
||||
.replace(/<p>\[\[(\d+)\]\]<\/p>/g, function (_, id) {
|
||||
return placeholder[id] || '';
|
||||
});
|
||||
|
||||
content = fis.compile.partial(content, file, 'html');
|
||||
// + `\n\n<div class="m-t-lg b-l b-info b-3x wrapper bg-light dk">文档内容有误?欢迎大家一起来编写,文档地址:<i class="fa fa-github"></i><a href="https://github.com/baidu/amis/tree/master${file.subpath}">${file.subpath}</a>。</div>`;
|
||||
|
Loading…
Reference in New Issue
Block a user