Skip to content

Commit 086c285

Browse files
snyk-botKoooooo-7sy-records
authored
[Snyk] Security upgrade marked from 0.7.0 to 1.1.1 (#1313)
* fix: package.json & package-lock.json to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-MARKED-584281 * fix: fix CompileError * fix: embed files error Co-authored-by: Koy <369491420@qq.com> Co-authored-by: 沈唁 <52o@qq52o.cn>
1 parent f7be0b0 commit 086c285

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

build/build.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ async function build(opts) {
2222
.rollup({
2323
input: opts.input,
2424
plugins: (opts.plugins || []).concat([
25-
buble(),
25+
buble({
26+
transforms: {
27+
dangerousForOf: true
28+
}}),
2629
commonjs(),
2730
nodeResolve(),
2831
replace({
@@ -33,8 +36,8 @@ async function build(opts) {
3336
onwarn: function (message) {
3437
if (message.code === 'UNRESOLVED_IMPORT') {
3538
throw new Error(
36-
`Could not resolve module ` +
37-
message.source +
39+
`Could not resolve module ` +
40+
message.source +
3841
`. Try running 'npm install' or using rollup's 'external' option if this is an external dependency. ` +
3942
`Module ${message.source} is imported in ${message.importer}`
4043
)

docs/embed-files.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Sometimes you don't want to embed a whole file. Maybe because you need just a fe
6262
[filename](_media/example.js ':include :type=code :fragment=demo')
6363
```
6464

65-
In your code file you need to surround the fragment between `/// [demo]` lines (before and after the fragment).
65+
In your code file you need to surround the fragment between `/// [demo]` lines (before and after the fragment).
6666
Alternatively you can use `### [demo]`.
6767

6868
Example:
@@ -153,7 +153,7 @@ The `LABEL` can be any text you want. It acts as a _fallback_ message if the lin
153153
### Render a codeblock from a gist
154154

155155
The format is the same as the previous section, but with `:type=code` added to the alt text. As with the [Embedded file type](#embedded-file-type) section, the syntax highlighting will be **inferred** from the extension (e.g. `.js` or `.py`), so you can leave the `type` set as `code`.
156-
156+
157157
Here is the format:
158158

159159
```markdown

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
},
5959
"dependencies": {
6060
"dompurify": "^2.0.8",
61-
"marked": "^0.7.0",
61+
"marked": "^1.1.1",
6262
"medium-zoom": "^1.0.5",
6363
"opencollective-postinstall": "^2.0.2",
6464
"prismjs": "^1.19.0",

src/core/render/embed.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function prerenderEmbed({ compiler, raw = '', fetch }, done) {
101101
const compile = compiler._marked;
102102
let tokens = compile.lexer(raw);
103103
const embedTokens = [];
104-
const linkRE = compile.InlineLexer.rules.link;
104+
const linkRE = compile.Lexer.rules.inline.link;
105105
const links = tokens.links;
106106

107107
tokens.forEach((token, index) => {

0 commit comments

Comments
 (0)