forked from Orc/discount
/
markdown.1
169 lines (169 loc) · 2.55 KB
/
markdown.1
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
.TH MARKDOWN 1
.SH NAME
markdown \- convert Markdown text to HTML
.SH SYNOPSIS
.B markdown
[
.B -dTV
]
[
.BI -b " url-base
]
[
.BI -F " bitmap
]
[
.BI -f " flags
]
[
.BI -o " ofile
]
[
.BI -s " text
]
[
.BI -t " text
]
[
.I file
]
.SH DESCRIPTION
The
.I markdown
utility reads the
.IR Markdown (6)-formatted
.I file
(or standard input) and writes its
.SM HTML
fragment representation on standard output.
.PP
The options are:
.TF dfdoptions
.TP
.BI -b " url-base
Links in source begining with
.B /
will be prefixed with
.I url-base
in the output.
.TP
.B -d
Instead of printing an
.SM HTML
fragment, print a parse tree.
.TP
.BI -F " bitmap
Set translation flags.
.I Bitmap
is a bit map of the various configuration options described in
.IR markdown (2).
.TP
.BI -f " flags
Set or clear various translation
.IR flags ,
described below.
.I Flags
are in a comma-delimited list, with an optional
.B +
(set) prefix on each flag.
.TP
.BI -o " ofile
Write the generated
.SM HTML
to
.IR ofile .
.TP
.BI -s " text
Use the
.IR markdown (2)
function to format the
.I text
on standard input.
.TP
.B -T
Under
.B -f
.BR toc ,
print the table of contents as an unordered list before the usual
.SM HTML
output.
.TP
.BI -t " text
Use
.IR mkd_text
(in
.IR markdown (2))
to format
.I text
instead of processing standard input with
.IR markdown .
.TP
.B -V
Show version number and configuration. If the version includes the string
.BR DL_TAG ,
.I markdown
was configured with definition list support. If the version includes the string
.BR HEADER ,
.I markdown
was configured to support pandoc header blocks.
.PD
.SS TRANSLATION FLAGS
The translation flags understood by
.B -f
are:
.TF \ noheader
.TP
.B noimage
Don't allow image tags.
.TP
.B nolinks
Don't allow links.
.TP
.B nohtml
Don't allow any embedded HTML.
.TP
.B cdata
Generate valid XML output.
.TP
.B noheader
Do not process pandoc headers.
.TP
.B notables
Do not process the syntax extension for tables.
.TP
.B tabstops
Use Markdown-standard 4-space tabstops.
.TP
.B strict
Disable superscript and relaxed emphasis.
.TP
.B relax
Enable superscript and relaxed emphasis (the default).
.TP
.B toc
Enable table of contents support, generated from headings (in
.IR markdown (6))
in the source.
.TP
.B 1.0
Revert to Markdown 1.0 compatibility.
.PD
.PP
For example,
.B -f nolinks,quot
tells
.I markdown
not to allow
.B <a>
tags, and to expand double quotes.
.SH SOURCE
.B /sys/src/cmd/discount
.SH SEE ALSO
.IR markdown (2),
.IR markdown (6)
.PP
http://daringfireball.net/projects/markdown/,
``Markdown''.
.SH DIAGNOSTICS
.I Markdown
exits 0 on success and >0 if an error occurs.