summaryrefslogtreecommitdiff
path: root/man/man1/cmark.1
blob: 0771400305f5d478f73c85efbf7286c5105c03a2 (plain)
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
.TH "cmark" "1" "Feburary 11, 2020" "LOCAL" "General Commands Manual"
.SH "NAME"
\fBcmark\fR
\- convert CommonMark formatted text to HTML
.SH "SYNOPSIS"
.HP 6n
\fBcmark\fR
[options]
file*
.SH "DESCRIPTION"
\fBcmark\fR
converts Markdown formatted plain text to either HTML, groff man,
CommonMark XML, LaTeX, or CommonMark, using the conventions
described in the CommonMark spec.  It reads input from \fIstdin\fR
or the specified files (concatenating their contents) and writes
output to \fIstdout\fR.
.SH "OPTIONS"
.TP 12n
.B \-\-to, \-t \f[I]FORMAT\f[]
Specify output format (\f[C]html\f[], \f[C]man\f[], \f[C]xml\f[],
\f[C]latex\f[], \f[C]commonmark\f[]).
.TP 12n
.B \-\-width \f[I]WIDTH\f[]
Specify a column width to which to wrap the output. For no wrapping, use
the value 0 (the default).  This option currently only affects the
commonmark, latex, and man renderers.
.TP 12n
.B \-\-hardbreaks
Render soft breaks (newlines inside paragraphs in the CommonMark source)
as hard line breaks in the target format.  If this option is specified,
hard wrapping is disabled for CommonMark output, regardless of the value
given with \-\-width.
.TP 12n
.B \-\-nobreaks
Render soft breaks as spaces.  If this option is specified,
hard wrapping is disabled for all output formats, regardless of the value
given with \-\-width.
.TP 12n
.B \-\-sourcepos
Include source position attribute.
.TP 12n
.B \-\-validate-utf8
Validate UTF-8, replacing illegal sequences with U+FFFD.
.TP 12n
.B \-\-smart
Use smart punctuation.  Straight double and single quotes will
be rendered as curly quotes, depending on their position.
\f[C]\-\-\f[] will be rendered as an en-dash.
\f[C]\-\-\-\f[] will be rendered as an em-dash.
\f[C]...\f[] will be rendered as ellipses.
.TP 12n
.B \-\-safe
Omit raw HTML and potentially dangerous URLs (default).
Raw HTML is replaced by a placeholder comment
and potentially dangerous URLs are replaced by empty strings.
Potentially dangerous URLs are those that begin with `javascript:`,
`vbscript:`, `file:`, or `data:` (except for `image/png`,
`image/gif`, `image/jpeg`, or `image/webp` mime types).
.TP 12n
.B \-\-unsafe
Render raw HTML or potentially dangerous URLs, overriding
the default (\-\-safe) behavior.
.TP 12n
.B \-\-help
Print usage information.
.TP 12n
.B \-\-version
Print version.
.SH "AUTHORS"
John MacFarlane, Vicent Marti, Kārlis Gaņģis, Nick Wellnhofer.
.SH "SEE ALSO"
.PP
CommonMark spec:  \f[C]https://spec.commonmark.org\f[].