File size: 2,378 Bytes
bc20498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
.TH "MARKED" "1" "November 2023" "9.1.5"
.SH "NAME"
\fBmarked\fR \- a javascript markdown parser
.SH SYNOPSIS
.P
\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]
.SH DESCRIPTION
.P
marked is a full\-featured javascript markdown parser, built for speed\.
.br
It also includes multiple GFM features\.
.SH EXAMPLES
.RS 2
.nf
cat in\.md | marked > out\.html
.fi
.RE
.RS 2
.nf
echo "hello *world*" | marked
.fi
.RE
.RS 2
.nf
marked \-o out\.html \-i in\.md \-\-gfm
.fi
.RE
.RS 2
.nf
marked \-\-output="hello world\.html" \-i in\.md \-\-no\-breaks
.fi
.RE
.SH OPTIONS

.RS 1
.IP \(bu 2
\-o, \-\-output [output file]
.br
Specify file output\. If none is specified, write to stdout\.
.IP \(bu 2
\-i, \-\-input [input file]
.br
Specify file input, otherwise use last argument as input file\.
.br
If no input file is specified, read from stdin\.
.IP \(bu 2
\-s, \-\-string [markdown string]
.br
Specify string input instead of a file\.
.IP \(bu 2
\-c, \-\-config [config file]
.br
Specify config file to use instead of the default \fB~/\.marked\.json\fP or \fB~/\.marked\.js\fP or \fB~/\.marked/index\.js\fP\|\.
.IP \(bu 2
\-t, \-\-tokens
.br
Output a token list instead of html\.
.IP \(bu 2
\-n, \-\-no\-clobber
.br
Do not overwrite \fBoutput\fP if it exists\.
.IP \(bu 2
\-\-pedantic
.br
Conform to obscure parts of markdown\.pl as much as possible\.
.br
Don't fix original markdown bugs\.
.IP \(bu 2
\-\-gfm
.br
Enable github flavored markdown\.
.IP \(bu 2
\-\-breaks
.br
Enable GFM line breaks\. Only works with the gfm option\.
.IP \(bu 2
\-\-no\-breaks, \-no\-etc\.\.\.
.br
The inverse of any of the marked options above\.
.IP \(bu 2
\-\-silent
.br
Silence error output\.
.IP \(bu 2
\-h, \-\-help
.br
Display help information\.

.RE
.SH CONFIGURATION
.P
For configuring and running programmatically\.
.P
Example
.RS 2
.nf
import { Marked } from 'marked';
const marked = new Marked({ gfm: true });
marked\.parse('*foo*');
.fi
.RE
.SH BUGS
.P
Please report any bugs to https://github.com/markedjs/marked
.SH LICENSE
.P
Copyright (c) 2011\-2014, Christopher Jeffrey (MIT License)\.
.SH SEE ALSO
.P
markdown(1), nodejs(1)