Fetching contributors…
Cannot retrieve contributors at this time
180 lines (179 sloc) 3.38 KB
.\" %A%
.Dd January 7, 2008
.Nm markdown
.Nd text to html conversion tool
.Op Fl d
.Op Fl T
.Op Fl V
.Op Fl b Ar url-base
.Op Fl C Ar prefix
.Op Fl F Pa bitmap
.Op Fl f Ar flags
.Op Fl n
.Op Fl o Pa file
.Op Fl S
.Op Fl s Pa text
.Op Fl t Pa text
.Op Pa textfile
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.
The options are as follows:
.Bl -tag -width "-o file"
.It Fl b Ar url-base
Links in source beginning with / will be prefixed with
.Ar url-base
in the output.
.It Fl C
When processing markdown extra-style footnotes, use the
given prefix instead of the default of
.Ar fn .
.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 +
.Ar -
(disable), or
.Ar no
(disable) lprefix on each flag.
.Bl -tag -width "definitionlist"
.It Ar links
Allow links.
.It Ar image
Allow images.
.It Ar smarty
Enable smartypants.
.It Ar pants
Enable smartypants.
.It Ar html
Allow raw html.
.It Ar strict
Disable superscript, strikethrough & relaxed emphasis.
.It Ar ext
Enable pseudo-protocols.
.It Ar cdata
Generate code for xml
.Em ![CDATA[...]] .
.It Ar superscript
Enable superscript processing.
.It Ar emphasis
Emphasis happens
.Em everywhere .
.It Ar tables
Don't process PHP Markdown Extra tables.
.It Ar del
.Em ~~strikethrough~~ .
.It Ar strikethrough
.Em ~~strikethrough~~ .
.It Ar toc
Enable table-of-contents processing.
.It Ar 1.0
Compatibility with MarkdownTest_1.0
.It Ar autolink
a link even without
.Em <> .
.It Ar safelink
Paranoid check for link protocol.
.It Ar header
Process pandoc-style header blocks.
.It Ar tabstop
Expand tabs to 4 spaces.
.It Ar divquote
.Pa >%class%
.It Ar alphalist
Allow alphabetic lists.
.It Ar definitionlist
Allow definition lists.
.It Ar footnote
Allow markdown extra-style footnotes.
.It Ar styles
Extract <style> blocks from the output.
As an example, the option
.Fl f Ar nolinks,smarty
to not allow \<a tags, and to do smarty
pants processing.
.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 n
Don't write generated html.
.It Fl o Pa file
Write the generated html to
.Pa file .
.It Fl S
output <style> blocks.
.It Fl V
Show the version# and compile-time configuration data.
If the version includes the string
was configured with memory allocation debugging.
If the version includes the string
.Em TAB ,
was configured to use the specified tabstop.
.It Fl VV
Show the version#, the compile-time configuration, and the
run-time configuration.
.It Fl t Ar text
.Xr mkd_text 3
to format
.Ar text
instead of processing stdin with the
.Xr markdown 3
.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 .
utility exits 0 on success, and >0 if an error occurs.
.Xr markdown 3 ,
.Xr markdown 7 ,
.Xr mkd-extensions 7 .
.An David Parsons
.Pq Li