marked 11.1.1 → 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/main.js +4 -4
- package/lib/marked.cjs +4 -3
- package/lib/marked.cjs.map +1 -1
- package/lib/marked.d.cts +1 -1
- package/lib/marked.d.ts +1 -1
- package/lib/marked.esm.js +4 -3
- package/lib/marked.esm.js.map +1 -1
- package/lib/marked.umd.js +4 -3
- package/lib/marked.umd.js.map +1 -1
- package/man/marked.1 +1 -1
- package/marked.min.js +3 -3
- package/package.json +9 -9
package/bin/main.js
CHANGED
|
@@ -222,8 +222,7 @@ export async function main(nodeProcess) {
|
|
|
222
222
|
|
|
223
223
|
if (output) {
|
|
224
224
|
if (noclobber && await fileExists(output)) {
|
|
225
|
-
|
|
226
|
-
nodeProcess.exit(1);
|
|
225
|
+
throw Error('marked: output file \'' + output + '\' already exists, disable the \'-n\' / \'--no-clobber\' flag to overwrite\n');
|
|
227
226
|
}
|
|
228
227
|
return await writeFile(output, html);
|
|
229
228
|
}
|
|
@@ -271,9 +270,10 @@ export async function main(nodeProcess) {
|
|
|
271
270
|
nodeProcess.exit(0);
|
|
272
271
|
} catch (err) {
|
|
273
272
|
if (err.code === 'ENOENT') {
|
|
274
|
-
nodeProcess.stderr.write('marked:
|
|
273
|
+
nodeProcess.stderr.write('marked: ' + err.path + ': No such file or directory');
|
|
274
|
+
} else {
|
|
275
|
+
nodeProcess.stderr.write(err.message);
|
|
275
276
|
}
|
|
276
|
-
nodeProcess.stderr.write(err);
|
|
277
277
|
return nodeProcess.exit(1);
|
|
278
278
|
}
|
|
279
279
|
}
|
package/lib/marked.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* marked v11.
|
|
3
|
-
* Copyright (c) 2011-
|
|
2
|
+
* marked v11.2.0 - a markdown parser
|
|
3
|
+
* Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)
|
|
4
4
|
* https://github.com/markedjs/marked
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -2091,7 +2091,8 @@ class Marked {
|
|
|
2091
2091
|
const genericToken = token;
|
|
2092
2092
|
if (this.defaults.extensions?.childTokens?.[genericToken.type]) {
|
|
2093
2093
|
this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {
|
|
2094
|
-
|
|
2094
|
+
const tokens = genericToken[childTokens].flat(Infinity);
|
|
2095
|
+
values = values.concat(this.walkTokens(tokens, callback));
|
|
2095
2096
|
});
|
|
2096
2097
|
}
|
|
2097
2098
|
else if (genericToken.tokens) {
|