Discount

The markdown program

The markdown program is a trivial compiler that reads in a markdown file and writes out a html document or – if you use the -d flag – an outline showing the parse tree. It does have a few options;

-d
is, as previously mentioned, the flag that makes markdown produce a parse tree instead of a html document.
-F <flags>
sets various flags that change how markdown works. The flags argument is a somewhat less than obvious bitmask – for example, -F 0x4 tells markdown to not do the smartypants translations on the output. (there are cases – like running the test suite – where this is a useful feature.)
-f <flags>
sets various flags that change how markdown works. Unlike -F, these are the names of the flags (you can get a list of the supported flags with the -f? option; supported flags + synonyms with -Vf? ) optionally prefixed with no or - to turn them off. To reuse the example to disable smartypants, you’d do -f nopants (“pants” is a synonym for “smarty” == smartypants.)
-o file
tells markdown to write the output to file
-V

tells you a markdown version number and how the package was configured. For example

  $ markdown -V
  markdown: discount 2.2.2 TAB=8 DEBUG

tells you that this is markdown 2.2.2, and that the package was configured with support for sensible tabs & debugging malloc.

-VV
is like -V, except it also returns the current values of many of the flags that can be set with -f or -F.