Files
discount/markdown.1
T
david parsons 2d7f738879 Since everything is runtime configured now, markdown.1 doesn't
need to have substitutions made against it before it's built.
And while I'm at it, I need to explain every flag possible in
the markdown(1) program.
2010-10-22 15:03:28 -07:00

155 lines
3.0 KiB
Groff

.\" %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 +
(enable),
.Ar -
(disable), or
.Ar no
(disable) lprefix on each flag.
.Bl -tag -width "definitionlist"
.It Ar tabstop
Use markdown-standard 4-space tabstops.
.It Ar image
Allow images.
.It Ar links
Allow links.
.It Ar relax
Allow most optional features.
.It Ar strict
Prohibit most optional features.
.It Ar tables
Allow markdown-extra style tables.
.It Ar header
Allow pandoc headers.
.It Ar html
Allow embedded html.
.It Ar ext
Allow pseudo-protocols in links.
.It Ar cdata
Write output as CDATA.
.It Ar pants
Enable smartypants processing.
.It Ar smarty
Enable smartypants processing.
.It Ar toc
Enable table-of-contents support.
.It Ar autolink
Linkify any URLs found in the input.
.It Ar safelink
Only linkify URLs that are local or a well-known protocol.
.It Ar del
Enable strikethrough.
.It Ar strikethrough
Enable strikethrough.
.It Ar superscript
Enable superscript.
.It Ar emphasis
Enable relaxed emphasis (underscores in the middle of words do not count for emphasis.)
.It Ar divquote
Enable division quotes.
.It Ar alphalist
Enable alphabetic list items.
.It Ar definitionlist
Enable definition lists.
.It Ar 1.0
Revert to Markdown 1.0 compatability.
.El
.Pp
As an example, the option
.Fl f Ar nolinks,smarty
tells
.Nm
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 V
Show the version# and configuration data.
.Pp
If the version includes the string
.Em DEBUG ,
.Nm
was configured with memory allocation debugging.
.Pp
If the version includes the string
.Em TAB ,
.Nm
was configured to use the specified tabstop.
.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