mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:39:05 +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,7 +197,9 @@ module.exports = function (content, file) {
|
||||
}
|
||||
);
|
||||
|
||||
content = marked(content).replace(/<p>\[\[(\d+)\]\]<\/p>/g, function (_, id) {
|
||||
content = marked
|
||||
.parse(content)
|
||||
.replace(/<p>\[\[(\d+)\]\]<\/p>/g, function (_, id) {
|
||||
return placeholder[id] || '';
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user