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.

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