forked from Orc/discount
/
markdown.1.in
126 lines (126 loc) · 2.44 KB
/
markdown.1.in
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
.\" %A%
.\"
.Dd January 7, 2008
.Dt MARKDOWN 1
.Os MASTODON
.Sh NAME
.Nm markdown
.Nd text to html conversion tool
.Sh SYNOPSIS
.Nm
.Op Fl d
.Op Fl T
.Op Fl V
.Op Fl b Ar url-base
.Op Fl F Pa bitmap
.Op Fl f Ar flags
.Op Fl o Pa file
.Op Fl s Pa text
.Op Fl t Pa text
.Op Pa textfile
.Sh DESCRIPTION
The
.Nm
utility reads the
.Xr markdown 7 Ns -formatted
.Pa textfile
.Pq or stdin if not specified,
compiles it, and writes the html output
to stdout.
.Pp
The options are as follows:
.Bl -tag -width "-o file"
.It Fl b Ar url-base
Links in source begining with / will be prefixed with
.Ar url-base
in the output.
.It Fl d
Instead of writing the html file, dump a parse
tree to stdout.
.It Fl f Ar flags
Set or clear various translation flags. The flags
are in a comma-delimited list, with an optional
.Ar +
(set) prefix on each flag.
.Bl -tag -width "NOHEADER"
.It Ar noimage
Don't allow image tags.
.It Ar nolinks
Don't allow links.
.It Ar nohtml
Don't allow
.B any
embedded html.
.It Ar cdata
Generate valid XML output.
.It Ar noheader
Do not process pandoc headers.
.It Ar tabstops
Use markdown-standard 4-space tabstops.
@STRICT@.It Ar strict
@STRICT@Disable superscript and relaxed emphasis.
@STRICT@.It Ar relax
@STRICT@Enable superscript and relaxed emphasis (this is the default.)
.It Ar toc
Enable table-of-contents support
.It Ar 1.0
Revert to Markdown 1.0 compatability.
.El
.Pp
As an example, the option
.Fl f Ar nolinks,quot
tells
.Nm
to not allow \<a tags, and to expand
double-quotes.
.It Fl F Ar bitmap
Set translation flags.
.Ar Bitmap
is a bit map of the various configuration options
described in
.Xr markdown 3
(the flag values are defined in
.Pa mkdio.h )
.It Fl V
Show the version# and configuration data.
.Pp
If the version includes the string
.Em DL_TAG ,
.Nm
was configured with definition list support.
.Pp
If the version includes the string
.Em HEADER ,
.Nm
was configured to support pandoc header blocks.
.It Fl o Pa file
Write the generated html to
.Pa file .
.It Fl t Ar text
Use
.Xr mkd_text 3
to format
.Ar text
instead of processing stdin with the
.Xr markdown 3
function.
.It Fl T
If run with the table-of-content flag on, dump the
table of contents before the formatted text.
.It Fl s Ar text
Use the
.Xr markdown 3
function to format
.Ar text .
.El
.Sh RETURN VALUES
The
.Nm
utility exits 0 on success, and >0 if an error occurs.
.Sh SEE ALSO
.Xr markdown 3 ,
.Xr markdown 7 ,
.Xr mkd-extensions 7 .
.Sh AUTHOR
.An David Parsons
.Pq Li orc@pell.chi.il.us