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.

169 lines
2.6 KiB

  1. .TH MARKDOWN 1
  2. .SH NAME
  3. markdown \- convert Markdown text to HTML
  4. .SH SYNOPSIS
  5. .B markdown
  6. [
  7. .B -dTV
  8. ]
  9. [
  10. .BI -b " url-base
  11. ]
  12. [
  13. .BI -F " bitmap
  14. ]
  15. [
  16. .BI -f " flags
  17. ]
  18. [
  19. .BI -o " ofile
  20. ]
  21. [
  22. .BI -s " text
  23. ]
  24. [
  25. .BI -t " text
  26. ]
  27. [
  28. .I file
  29. ]
  30. .SH DESCRIPTION
  31. The
  32. .I markdown
  33. utility reads the
  34. .IR Markdown (6)-formatted
  35. .I file
  36. (or standard input) and writes its
  37. .SM HTML
  38. fragment representation on standard output.
  39. .PP
  40. The options are:
  41. .TF dfdoptions
  42. .TP
  43. .BI -b " url-base
  44. Links in source begining with
  45. .B /
  46. will be prefixed with
  47. .I url-base
  48. in the output.
  49. .TP
  50. .B -d
  51. Instead of printing an
  52. .SM HTML
  53. fragment, print a parse tree.
  54. .TP
  55. .BI -F " bitmap
  56. Set translation flags.
  57. .I Bitmap
  58. is a bit map of the various configuration options described in
  59. .IR markdown (2).
  60. .TP
  61. .BI -f " flags
  62. Set or clear various translation
  63. .IR flags ,
  64. described below.
  65. .I Flags
  66. are in a comma-delimited list, with an optional
  67. .B +
  68. (set) prefix on each flag.
  69. .TP
  70. .BI -o " ofile
  71. Write the generated
  72. .SM HTML
  73. to
  74. .IR ofile .
  75. .TP
  76. .BI -s " text
  77. Use the
  78. .IR markdown (2)
  79. function to format the
  80. .I text
  81. on standard input.
  82. .TP
  83. .B -T
  84. Under
  85. .B -f
  86. .BR toc ,
  87. print the table of contents as an unordered list before the usual
  88. .SM HTML
  89. output.
  90. .TP
  91. .BI -t " text
  92. Use
  93. .IR mkd_text
  94. (in
  95. .IR markdown (2))
  96. to format
  97. .I text
  98. instead of processing standard input with
  99. .IR markdown .
  100. .TP
  101. .B -V
  102. Show version number and configuration. If the version includes the string
  103. .BR DL_TAG ,
  104. .I markdown
  105. was configured with definition list support. If the version includes the string
  106. .BR HEADER ,
  107. .I markdown
  108. was configured to support pandoc header blocks.
  109. .PD
  110. .SS TRANSLATION FLAGS
  111. The translation flags understood by
  112. .B -f
  113. are:
  114. .TF \ noheader
  115. .TP
  116. .B noimage
  117. Don't allow image tags.
  118. .TP
  119. .B nolinks
  120. Don't allow links.
  121. .TP
  122. .B nohtml
  123. Don't allow any embedded HTML.
  124. .TP
  125. .B cdata
  126. Generate valid XML output.
  127. .TP
  128. .B noheader
  129. Do not process pandoc headers.
  130. .TP
  131. .B notables
  132. Do not process the syntax extension for tables.
  133. .TP
  134. .B tabstops
  135. Use Markdown-standard 4-space tabstops.
  136. .TP
  137. .B strict
  138. Disable superscript and relaxed emphasis.
  139. .TP
  140. .B relax
  141. Enable superscript and relaxed emphasis (the default).
  142. .TP
  143. .B toc
  144. Enable table of contents support, generated from headings (in
  145. .IR markdown (6))
  146. in the source.
  147. .TP
  148. .B 1.0
  149. Revert to Markdown 1.0 compatibility.
  150. .PD
  151. .PP
  152. For example,
  153. .B -f nolinks,quot
  154. tells
  155. .I markdown
  156. not to allow
  157. .B <a>
  158. tags, and to expand double quotes.
  159. .SH SOURCE
  160. .B /sys/src/cmd/discount
  161. .SH SEE ALSO
  162. .IR markdown (2),
  163. .IR markdown (6)
  164. .PP
  165. http://daringfireball.net/projects/markdown/,
  166. ``Markdown''.
  167. .SH DIAGNOSTICS
  168. .I Markdown
  169. exits 0 on success and >0 if an error occurs.