marked 9.0.2 → 9.1.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 +10 -1
- package/lib/marked.cjs +1 -1
- package/lib/marked.esm.js +1 -1
- package/lib/marked.umd.js +1 -1
- package/man/marked.1 +6 -2
- package/man/marked.1.md +4 -1
- package/marked.min.js +1 -1
- package/package.json +11 -11
package/bin/main.js
CHANGED
|
@@ -32,7 +32,7 @@ export async function main(nodeProcess) {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
35
|
-
const helpText = await readFile(resolve(__dirname, '../man/marked.1.
|
|
35
|
+
const helpText = await readFile(resolve(__dirname, '../man/marked.1.md'), 'utf8');
|
|
36
36
|
|
|
37
37
|
// eslint-disable-next-line promise/param-names
|
|
38
38
|
await new Promise(res => {
|
|
@@ -62,6 +62,7 @@ export async function main(nodeProcess) {
|
|
|
62
62
|
let tokens;
|
|
63
63
|
let config;
|
|
64
64
|
let opt;
|
|
65
|
+
let noclobber;
|
|
65
66
|
|
|
66
67
|
function getArg() {
|
|
67
68
|
let arg = argv.shift();
|
|
@@ -114,6 +115,10 @@ export async function main(nodeProcess) {
|
|
|
114
115
|
case '--config':
|
|
115
116
|
config = argv.shift();
|
|
116
117
|
break;
|
|
118
|
+
case '-n':
|
|
119
|
+
case '--no-clobber':
|
|
120
|
+
noclobber = true;
|
|
121
|
+
break;
|
|
117
122
|
case '-h':
|
|
118
123
|
case '--help':
|
|
119
124
|
return await help();
|
|
@@ -216,6 +221,10 @@ export async function main(nodeProcess) {
|
|
|
216
221
|
: await marked.parse(data, options);
|
|
217
222
|
|
|
218
223
|
if (output) {
|
|
224
|
+
if (noclobber && await fileExists(output)) {
|
|
225
|
+
nodeProcess.stderr.write('marked: output file \'' + output + '\' already exists, disable the \'-n\' / \'--no-clobber\' flag to overwrite\n');
|
|
226
|
+
nodeProcess.exit(1);
|
|
227
|
+
}
|
|
219
228
|
return await writeFile(output, html);
|
|
220
229
|
}
|
|
221
230
|
|
package/lib/marked.cjs
CHANGED
package/lib/marked.esm.js
CHANGED
package/lib/marked.umd.js
CHANGED
package/man/marked.1
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
.TH "MARKED" "1" "
|
|
1
|
+
.TH "MARKED" "1" "October 2023" "9.0.3"
|
|
2
2
|
.SH "NAME"
|
|
3
3
|
\fBmarked\fR \- a javascript markdown parser
|
|
4
4
|
.SH SYNOPSIS
|
|
5
5
|
.P
|
|
6
|
-
\fBmarked\fP [\fB\-o\fP <output file>] [\fB\-i\fP <input file>] [\fB\-s\fP <markdown string>] [\fB\-c\fP <config file>] [\fB\-\-help\fP] [\fB\-\-version\fP] [\fB\-\-tokens\fP] [\fB\-\-pedantic\fP] [\fB\-\-gfm\fP] [\fB\-\-breaks\fP] [\fB\-\-no\-etc\.\.\.\fP] [\fB\-\-silent\fP] [filename]
|
|
6
|
+
\fBmarked\fP [\fB\-o\fP <output file>] [\fB\-i\fP <input file>] [\fB\-s\fP <markdown string>] [\fB\-c\fP <config file>] [\fB\-\-help\fP] [\fB\-\-version\fP] [\fB\-\-tokens\fP] [\fB\-\-no\-clobber\fP] [\fB\-\-pedantic\fP] [\fB\-\-gfm\fP] [\fB\-\-breaks\fP] [\fB\-\-no\-etc\.\.\.\fP] [\fB\-\-silent\fP] [filename]
|
|
7
7
|
.SH DESCRIPTION
|
|
8
8
|
.P
|
|
9
9
|
marked is a full\-featured javascript markdown parser, built for speed\.
|
|
@@ -56,6 +56,10 @@ Specify config file to use instead of the default \fB~/\.marked\.json\fP or \fB~
|
|
|
56
56
|
.br
|
|
57
57
|
Output a token list instead of html\.
|
|
58
58
|
.IP \(bu 2
|
|
59
|
+
\-n, \-\-no\-clobber
|
|
60
|
+
.br
|
|
61
|
+
Do not overwrite \fBoutput\fP if it exists\.
|
|
62
|
+
.IP \(bu 2
|
|
59
63
|
\-\-pedantic
|
|
60
64
|
.br
|
|
61
65
|
Conform to obscure parts of markdown\.pl as much as possible\.
|
package/man/marked.1.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## SYNOPSIS
|
|
4
4
|
|
|
5
|
-
`marked` [`-o` <output file>] [`-i` <input file>] [`-s` <markdown string>] [`-c` <config file>] [`--help`] [`--version`] [`--tokens`] [`--pedantic`] [`--gfm`] [`--breaks`] [`--no-etc...`] [`--silent`] [filename]
|
|
5
|
+
`marked` [`-o` <output file>] [`-i` <input file>] [`-s` <markdown string>] [`-c` <config file>] [`--help`] [`--version`] [`--tokens`] [`--no-clobber`] [`--pedantic`] [`--gfm`] [`--breaks`] [`--no-etc...`] [`--silent`] [filename]
|
|
6
6
|
|
|
7
7
|
## DESCRIPTION
|
|
8
8
|
|
|
@@ -45,6 +45,9 @@ Specify config file to use instead of the default `~/.marked.json` or `~/.marked
|
|
|
45
45
|
* -t, --tokens
|
|
46
46
|
Output a token list instead of html.
|
|
47
47
|
|
|
48
|
+
* -n, --no-clobber
|
|
49
|
+
Do not overwrite `output` if it exists.
|
|
50
|
+
|
|
48
51
|
* --pedantic
|
|
49
52
|
Conform to obscure parts of markdown.pl as much as possible.
|
|
50
53
|
Don't fix original markdown bugs.
|
package/marked.min.js
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "marked",
|
|
3
3
|
"description": "A markdown parser built for speed",
|
|
4
4
|
"author": "Christopher Jeffrey",
|
|
5
|
-
"version": "9.0
|
|
5
|
+
"version": "9.1.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./lib/marked.cjs",
|
|
8
8
|
"module": "./lib/marked.esm.js",
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"@markedjs/html-differ": "^4.0.2",
|
|
48
48
|
"@rollup/plugin-terser": "^0.4.3",
|
|
49
49
|
"@rollup/plugin-typescript": "^11.1.3",
|
|
50
|
-
"@semantic-release/commit-analyzer": "^
|
|
50
|
+
"@semantic-release/commit-analyzer": "^11.0.0",
|
|
51
51
|
"@semantic-release/git": "^10.0.1",
|
|
52
|
-
"@semantic-release/github": "^9.
|
|
53
|
-
"@semantic-release/npm": "^
|
|
54
|
-
"@semantic-release/release-notes-generator": "^
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
56
|
-
"@typescript-eslint/parser": "^6.
|
|
52
|
+
"@semantic-release/github": "^9.2.1",
|
|
53
|
+
"@semantic-release/npm": "^11.0.0",
|
|
54
|
+
"@semantic-release/release-notes-generator": "^12.0.0",
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
|
56
|
+
"@typescript-eslint/parser": "^6.7.3",
|
|
57
57
|
"cheerio": "^1.0.0-rc.12",
|
|
58
58
|
"commonmark": "0.30.0",
|
|
59
59
|
"cross-env": "^7.0.3",
|
|
60
|
-
"eslint": "^8.
|
|
60
|
+
"eslint": "^8.50.0",
|
|
61
61
|
"eslint-config-standard": "^17.1.0",
|
|
62
62
|
"eslint-plugin-import": "^2.28.1",
|
|
63
63
|
"eslint-plugin-n": "^16.1.0",
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
"front-matter": "^4.0.2",
|
|
66
66
|
"highlight.js": "^11.8.0",
|
|
67
67
|
"jasmine": "^5.1.0",
|
|
68
|
-
"markdown-it": "13.0.
|
|
68
|
+
"markdown-it": "13.0.2",
|
|
69
69
|
"marked-highlight": "^2.0.6",
|
|
70
70
|
"marked-man": "^1.3.4",
|
|
71
71
|
"node-fetch": "^3.3.2",
|
|
72
72
|
"recheck": "^4.4.5",
|
|
73
|
-
"rollup": "^3.
|
|
74
|
-
"semantic-release": "^
|
|
73
|
+
"rollup": "^3.29.4",
|
|
74
|
+
"semantic-release": "^22.0.5",
|
|
75
75
|
"titleize": "^4.0.0",
|
|
76
76
|
"ts-expect": "^1.3.0",
|
|
77
77
|
"ts-node": "^10.9.1",
|