Text::Markdown::Discount
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

171 lines
3.2 KiB

  1. .\" %A%
  2. .\"
  3. .Dd January 7, 2008
  4. .Dt MARKDOWN 1
  5. .Os MASTODON
  6. .Sh NAME
  7. .Nm markdown
  8. .Nd text to html conversion tool
  9. .Sh SYNOPSIS
  10. .Nm
  11. .Op Fl d
  12. .Op Fl T
  13. .Op Fl V
  14. .Op Fl b Ar url-base
  15. .Op Fl C Ar prefix
  16. .Op Fl F Pa bitmap
  17. .Op Fl f Ar flags
  18. .Op Fl o Pa file
  19. .Op Fl s Pa text
  20. .Op Fl t Pa text
  21. .Op Pa textfile
  22. .Sh DESCRIPTION
  23. The
  24. .Nm
  25. utility reads the
  26. .Xr markdown 7 Ns -formatted
  27. .Pa textfile
  28. .Pq or stdin if not specified,
  29. compiles it, and writes the html output
  30. to stdout.
  31. .Pp
  32. The options are as follows:
  33. .Bl -tag -width "-o file"
  34. .It Fl b Ar url-base
  35. Links in source beginning with / will be prefixed with
  36. .Ar url-base
  37. in the output.
  38. .It Fl C
  39. When processing markdown extra-style footnotes, use the
  40. given prefix instead of the default of
  41. .Ar fn .
  42. .It Fl d
  43. Instead of writing the html file, dump a parse
  44. tree to stdout.
  45. .It Fl f Ar flags
  46. Set or clear various translation flags. The flags
  47. are in a comma-delimited list, with an optional
  48. .Ar +
  49. (enable),
  50. .Ar -
  51. (disable), or
  52. .Ar no
  53. (disable) lprefix on each flag.
  54. .Bl -tag -width "definitionlist"
  55. .It Ar links
  56. Allow links.
  57. .It Ar image
  58. Allow images.
  59. .It Ar smarty
  60. Enable smartypants.
  61. .It Ar pants
  62. Enable smartypants.
  63. .It Ar html
  64. Allow raw html.
  65. .It Ar strict
  66. Disable superscript, strikethrough & relaxed emphasis.
  67. .It Ar ext
  68. Enable pseudo-protocols.
  69. .It Ar cdata
  70. Generate code for xml
  71. .Em ![CDATA[...]] .
  72. .It Ar superscript
  73. Enable superscript processing.
  74. .It Ar emphasis
  75. Emphasis happens
  76. .Em everywhere .
  77. .It Ar tables
  78. Don't process PHP Markdown Extra tables.
  79. .It Ar del
  80. Enable
  81. .Em ~~strikethrough~~ .
  82. .It Ar strikethrough
  83. Enable
  84. .Em ~~strikethrough~~ .
  85. .It Ar toc
  86. Enable table-of-contents processing.
  87. .It Ar 1.0
  88. Compatibility with MarkdownTest_1.0
  89. .It Ar autolink
  90. Make
  91. .Pa http://foo.com
  92. a link even without
  93. .Em <> .
  94. .It Ar safelink
  95. Paranoid check for link protocol.
  96. .It Ar header
  97. Process pandoc-style header blocks.
  98. .It Ar tabstop
  99. Expand tabs to 4 spaces.
  100. .It Ar divquote
  101. Allow
  102. .Pa >%class%
  103. blocks.
  104. .It Ar alphalist
  105. Allow alphabetic lists.
  106. .It Ar definitionlist
  107. Allow definition lists.
  108. .It Ar footnote
  109. Allow markdown extra-style footnotes.
  110. .El
  111. .Pp
  112. As an example, the option
  113. .Fl f Ar nolinks,smarty
  114. tells
  115. .Nm
  116. to not allow \<a tags, and to do smarty
  117. pants processing.
  118. .It Fl F Ar bitmap
  119. Set translation flags.
  120. .Ar Bitmap
  121. is a bit map of the various configuration options
  122. described in
  123. .Xr markdown 3
  124. (the flag values are defined in
  125. .Pa mkdio.h )
  126. .It Fl V
  127. Show the version# and compile-time configuration data.
  128. .Pp
  129. If the version includes the string
  130. .Em DEBUG ,
  131. .Nm
  132. was configured with memory allocation debugging.
  133. .Pp
  134. If the version includes the string
  135. .Em TAB ,
  136. .Nm
  137. was configured to use the specified tabstop.
  138. .It Fl VV
  139. Show the version#, the compile-time configuration, and the
  140. run-time configuration.
  141. .It Fl o Pa file
  142. Write the generated html to
  143. .Pa file .
  144. .It Fl t Ar text
  145. Use
  146. .Xr mkd_text 3
  147. to format
  148. .Ar text
  149. instead of processing stdin with the
  150. .Xr markdown 3
  151. function.
  152. .It Fl T
  153. If run with the table-of-content flag on, dump the
  154. table of contents before the formatted text.
  155. .It Fl s Ar text
  156. Use the
  157. .Xr markdown 3
  158. function to format
  159. .Ar text .
  160. .El
  161. .Sh RETURN VALUES
  162. The
  163. .Nm
  164. utility exits 0 on success, and >0 if an error occurs.
  165. .Sh SEE ALSO
  166. .Xr markdown 3 ,
  167. .Xr markdown 7 ,
  168. .Xr mkd-extensions 7 .
  169. .Sh AUTHOR
  170. .An David Parsons
  171. .Pq Li orc@pell.chi.il.us