rpeg-multimarkdown2 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (269) hide show
  1. data/LICENSE +96 -0
  2. data/README.markdown +52 -0
  3. data/Rakefile +167 -0
  4. data/bin/rpeg-multimarkdown2 +128 -0
  5. data/ext/extconf.h +3 -0
  6. data/ext/extconf.rb +15 -0
  7. data/ext/markdown.c +102 -0
  8. data/ext/markdown_lib.c +265 -0
  9. data/ext/markdown_lib.h +33 -0
  10. data/ext/markdown_output.c +2832 -0
  11. data/ext/markdown_parser.c +9091 -0
  12. data/ext/markdown_peg.h +144 -0
  13. data/ext/odf.c +183 -0
  14. data/ext/odf.h +3 -0
  15. data/ext/parsing_functions.c +199 -0
  16. data/ext/utility_functions.c +566 -0
  17. data/lib/multimarkdown2.rb +1 -0
  18. data/lib/peg_multimarkdown.rb +74 -0
  19. data/test/MultiMarkdownTest/BeamerTests/Beamer-Tables.html +76 -0
  20. data/test/MultiMarkdownTest/BeamerTests/Beamer-Tables.tex +64 -0
  21. data/test/MultiMarkdownTest/BeamerTests/Beamer-Tables.text +38 -0
  22. data/test/MultiMarkdownTest/CompatibilityTests/Automatic Labels.html +35 -0
  23. data/test/MultiMarkdownTest/CompatibilityTests/Automatic Labels.text +45 -0
  24. data/test/MultiMarkdownTest/CompatibilityTests/Base Header Level.html +14 -0
  25. data/test/MultiMarkdownTest/CompatibilityTests/Base Header Level.text +16 -0
  26. data/test/MultiMarkdownTest/CompatibilityTests/BibTeX.html +9 -0
  27. data/test/MultiMarkdownTest/CompatibilityTests/BibTeX.text +10 -0
  28. data/test/MultiMarkdownTest/CompatibilityTests/Citations.html +40 -0
  29. data/test/MultiMarkdownTest/CompatibilityTests/Citations.text +42 -0
  30. data/test/MultiMarkdownTest/CompatibilityTests/Definition Lists.html +40 -0
  31. data/test/MultiMarkdownTest/CompatibilityTests/Definition Lists.text +39 -0
  32. data/test/MultiMarkdownTest/CompatibilityTests/Dutch.html +17 -0
  33. data/test/MultiMarkdownTest/CompatibilityTests/Dutch.text +17 -0
  34. data/test/MultiMarkdownTest/CompatibilityTests/Email.html +40 -0
  35. data/test/MultiMarkdownTest/CompatibilityTests/Email.text +31 -0
  36. data/test/MultiMarkdownTest/CompatibilityTests/English.html +17 -0
  37. data/test/MultiMarkdownTest/CompatibilityTests/English.text +17 -0
  38. data/test/MultiMarkdownTest/CompatibilityTests/Errors.html +9 -0
  39. data/test/MultiMarkdownTest/CompatibilityTests/Errors.text +11 -0
  40. data/test/MultiMarkdownTest/CompatibilityTests/Footnotes.html +23 -0
  41. data/test/MultiMarkdownTest/CompatibilityTests/Footnotes.text +25 -0
  42. data/test/MultiMarkdownTest/CompatibilityTests/French.html +17 -0
  43. data/test/MultiMarkdownTest/CompatibilityTests/French.text +17 -0
  44. data/test/MultiMarkdownTest/CompatibilityTests/German.html +17 -0
  45. data/test/MultiMarkdownTest/CompatibilityTests/German.text +17 -0
  46. data/test/MultiMarkdownTest/CompatibilityTests/GermanGuillemets.html +17 -0
  47. data/test/MultiMarkdownTest/CompatibilityTests/GermanGuillemets.text +17 -0
  48. data/test/MultiMarkdownTest/CompatibilityTests/Glossary.html +29 -0
  49. data/test/MultiMarkdownTest/CompatibilityTests/Glossary.text +28 -0
  50. data/test/MultiMarkdownTest/CompatibilityTests/Headers.html +42 -0
  51. data/test/MultiMarkdownTest/CompatibilityTests/Headers.text +51 -0
  52. data/test/MultiMarkdownTest/CompatibilityTests/Line Breaks.html +13 -0
  53. data/test/MultiMarkdownTest/CompatibilityTests/Line Breaks.text +15 -0
  54. data/test/MultiMarkdownTest/CompatibilityTests/Link Attributes.html +35 -0
  55. data/test/MultiMarkdownTest/CompatibilityTests/Link Attributes.text +51 -0
  56. data/test/MultiMarkdownTest/CompatibilityTests/List Parsing.html +13 -0
  57. data/test/MultiMarkdownTest/CompatibilityTests/List Parsing.text +11 -0
  58. data/test/MultiMarkdownTest/CompatibilityTests/MarkdownInHTML.html +13 -0
  59. data/test/MultiMarkdownTest/CompatibilityTests/MarkdownInHTML.text +19 -0
  60. data/test/MultiMarkdownTest/CompatibilityTests/Math.html +14 -0
  61. data/test/MultiMarkdownTest/CompatibilityTests/Math.text +15 -0
  62. data/test/MultiMarkdownTest/CompatibilityTests/MetaData.html +14 -0
  63. data/test/MultiMarkdownTest/CompatibilityTests/MetaData.text +14 -0
  64. data/test/MultiMarkdownTest/CompatibilityTests/NotMetaData.html +3 -0
  65. data/test/MultiMarkdownTest/CompatibilityTests/NotMetaData.text +4 -0
  66. data/test/MultiMarkdownTest/CompatibilityTests/Sanity.html +77 -0
  67. data/test/MultiMarkdownTest/CompatibilityTests/Sanity.text +77 -0
  68. data/test/MultiMarkdownTest/CompatibilityTests/SmartQuotes.html +22 -0
  69. data/test/MultiMarkdownTest/CompatibilityTests/SmartQuotes.text +22 -0
  70. data/test/MultiMarkdownTest/CompatibilityTests/Swedish.html +17 -0
  71. data/test/MultiMarkdownTest/CompatibilityTests/Swedish.text +17 -0
  72. data/test/MultiMarkdownTest/CompatibilityTests/Tables.html +65 -0
  73. data/test/MultiMarkdownTest/CompatibilityTests/Tables.text +71 -0
  74. data/test/MultiMarkdownTest/MarkdownTest.pl +182 -0
  75. data/test/MultiMarkdownTest/MemoirTests/Automatic Labels.html +42 -0
  76. data/test/MultiMarkdownTest/MemoirTests/Automatic Labels.tex +47 -0
  77. data/test/MultiMarkdownTest/MemoirTests/Automatic Labels.text +46 -0
  78. data/test/MultiMarkdownTest/MemoirTests/Base Header Level.html +20 -0
  79. data/test/MultiMarkdownTest/MemoirTests/Base Header Level.tex +19 -0
  80. data/test/MultiMarkdownTest/MemoirTests/Base Header Level.text +16 -0
  81. data/test/MultiMarkdownTest/MemoirTests/BibTeX.html +17 -0
  82. data/test/MultiMarkdownTest/MemoirTests/BibTeX.tex +12 -0
  83. data/test/MultiMarkdownTest/MemoirTests/BibTeX.text +11 -0
  84. data/test/MultiMarkdownTest/MemoirTests/Citations.html +63 -0
  85. data/test/MultiMarkdownTest/MemoirTests/Citations.tex +48 -0
  86. data/test/MultiMarkdownTest/MemoirTests/Citations.text +43 -0
  87. data/test/MultiMarkdownTest/MemoirTests/Definition Lists.html +61 -0
  88. data/test/MultiMarkdownTest/MemoirTests/Definition Lists.tex +58 -0
  89. data/test/MultiMarkdownTest/MemoirTests/Definition Lists.text +40 -0
  90. data/test/MultiMarkdownTest/MemoirTests/Dutch.html +23 -0
  91. data/test/MultiMarkdownTest/MemoirTests/Dutch.tex +18 -0
  92. data/test/MultiMarkdownTest/MemoirTests/Dutch.text +17 -0
  93. data/test/MultiMarkdownTest/MemoirTests/Email.html +48 -0
  94. data/test/MultiMarkdownTest/MemoirTests/Email.tex +61 -0
  95. data/test/MultiMarkdownTest/MemoirTests/Email.text +32 -0
  96. data/test/MultiMarkdownTest/MemoirTests/English.html +23 -0
  97. data/test/MultiMarkdownTest/MemoirTests/English.tex +18 -0
  98. data/test/MultiMarkdownTest/MemoirTests/English.text +17 -0
  99. data/test/MultiMarkdownTest/MemoirTests/Footnotes.html +47 -0
  100. data/test/MultiMarkdownTest/MemoirTests/Footnotes.tex +28 -0
  101. data/test/MultiMarkdownTest/MemoirTests/Footnotes.text +26 -0
  102. data/test/MultiMarkdownTest/MemoirTests/French.html +23 -0
  103. data/test/MultiMarkdownTest/MemoirTests/French.tex +18 -0
  104. data/test/MultiMarkdownTest/MemoirTests/French.text +17 -0
  105. data/test/MultiMarkdownTest/MemoirTests/German.html +23 -0
  106. data/test/MultiMarkdownTest/MemoirTests/German.tex +18 -0
  107. data/test/MultiMarkdownTest/MemoirTests/German.text +17 -0
  108. data/test/MultiMarkdownTest/MemoirTests/GermanGuillemets.html +23 -0
  109. data/test/MultiMarkdownTest/MemoirTests/GermanGuillemets.tex +18 -0
  110. data/test/MultiMarkdownTest/MemoirTests/GermanGuillemets.text +17 -0
  111. data/test/MultiMarkdownTest/MemoirTests/Glossary.html +47 -0
  112. data/test/MultiMarkdownTest/MemoirTests/Glossary.tex +30 -0
  113. data/test/MultiMarkdownTest/MemoirTests/Glossary.text +29 -0
  114. data/test/MultiMarkdownTest/MemoirTests/Line Breaks.html +21 -0
  115. data/test/MultiMarkdownTest/MemoirTests/Line Breaks.tex +16 -0
  116. data/test/MultiMarkdownTest/MemoirTests/Line Breaks.text +16 -0
  117. data/test/MultiMarkdownTest/MemoirTests/Link Attributes.html +40 -0
  118. data/test/MultiMarkdownTest/MemoirTests/Link Attributes.tex +61 -0
  119. data/test/MultiMarkdownTest/MemoirTests/Link Attributes.text +51 -0
  120. data/test/MultiMarkdownTest/MemoirTests/Math.html +22 -0
  121. data/test/MultiMarkdownTest/MemoirTests/Math.tex +16 -0
  122. data/test/MultiMarkdownTest/MemoirTests/Math.text +16 -0
  123. data/test/MultiMarkdownTest/MemoirTests/Memoir Mode.html +24 -0
  124. data/test/MultiMarkdownTest/MemoirTests/Memoir Mode.tex +23 -0
  125. data/test/MultiMarkdownTest/MemoirTests/Memoir Mode.text +20 -0
  126. data/test/MultiMarkdownTest/MemoirTests/MetaData.html +22 -0
  127. data/test/MultiMarkdownTest/MemoirTests/MetaData.tex +14 -0
  128. data/test/MultiMarkdownTest/MemoirTests/MetaData.text +15 -0
  129. data/test/MultiMarkdownTest/MemoirTests/Sanity.html +100 -0
  130. data/test/MultiMarkdownTest/MemoirTests/Sanity.tex +101 -0
  131. data/test/MultiMarkdownTest/MemoirTests/Sanity.text +78 -0
  132. data/test/MultiMarkdownTest/MemoirTests/SmartQuotes.html +26 -0
  133. data/test/MultiMarkdownTest/MemoirTests/SmartQuotes.tex +21 -0
  134. data/test/MultiMarkdownTest/MemoirTests/SmartQuotes.text +19 -0
  135. data/test/MultiMarkdownTest/MemoirTests/Swedish.html +23 -0
  136. data/test/MultiMarkdownTest/MemoirTests/Swedish.tex +18 -0
  137. data/test/MultiMarkdownTest/MemoirTests/Swedish.text +17 -0
  138. data/test/MultiMarkdownTest/MemoirTests/Tables.html +221 -0
  139. data/test/MultiMarkdownTest/MemoirTests/Tables.tex +134 -0
  140. data/test/MultiMarkdownTest/MemoirTests/Tables.text +64 -0
  141. data/test/MultiMarkdownTest/MultiMarkdownTests/Automatic Labels.html +43 -0
  142. data/test/MultiMarkdownTest/MultiMarkdownTests/Automatic Labels.tex +46 -0
  143. data/test/MultiMarkdownTest/MultiMarkdownTests/Automatic Labels.text +45 -0
  144. data/test/MultiMarkdownTest/MultiMarkdownTests/Base Header Level.html +22 -0
  145. data/test/MultiMarkdownTest/MultiMarkdownTests/Base Header Level.tex +19 -0
  146. data/test/MultiMarkdownTest/MultiMarkdownTests/Base Header Level.text +16 -0
  147. data/test/MultiMarkdownTest/MultiMarkdownTests/BibTeX.html +18 -0
  148. data/test/MultiMarkdownTest/MultiMarkdownTests/BibTeX.tex +11 -0
  149. data/test/MultiMarkdownTest/MultiMarkdownTests/BibTex.text +10 -0
  150. data/test/MultiMarkdownTest/MultiMarkdownTests/Citations.html +64 -0
  151. data/test/MultiMarkdownTest/MultiMarkdownTests/Citations.tex +47 -0
  152. data/test/MultiMarkdownTest/MultiMarkdownTests/Citations.text +42 -0
  153. data/test/MultiMarkdownTest/MultiMarkdownTests/Definition Lists.html +57 -0
  154. data/test/MultiMarkdownTest/MultiMarkdownTests/Definition Lists.tex +57 -0
  155. data/test/MultiMarkdownTest/MultiMarkdownTests/Definition Lists.text +39 -0
  156. data/test/MultiMarkdownTest/MultiMarkdownTests/Dutch.html +25 -0
  157. data/test/MultiMarkdownTest/MultiMarkdownTests/Dutch.tex +18 -0
  158. data/test/MultiMarkdownTest/MultiMarkdownTests/Dutch.text +17 -0
  159. data/test/MultiMarkdownTest/MultiMarkdownTests/Email.html +49 -0
  160. data/test/MultiMarkdownTest/MultiMarkdownTests/Email.tex +54 -0
  161. data/test/MultiMarkdownTest/MultiMarkdownTests/Email.text +31 -0
  162. data/test/MultiMarkdownTest/MultiMarkdownTests/English.html +25 -0
  163. data/test/MultiMarkdownTest/MultiMarkdownTests/English.tex +18 -0
  164. data/test/MultiMarkdownTest/MultiMarkdownTests/English.text +17 -0
  165. data/test/MultiMarkdownTest/MultiMarkdownTests/Errors.html +18 -0
  166. data/test/MultiMarkdownTest/MultiMarkdownTests/Errors.tex +11 -0
  167. data/test/MultiMarkdownTest/MultiMarkdownTests/Errors.text +11 -0
  168. data/test/MultiMarkdownTest/MultiMarkdownTests/Footnotes.html +48 -0
  169. data/test/MultiMarkdownTest/MultiMarkdownTests/Footnotes.tex +24 -0
  170. data/test/MultiMarkdownTest/MultiMarkdownTests/Footnotes.text +25 -0
  171. data/test/MultiMarkdownTest/MultiMarkdownTests/French.html +25 -0
  172. data/test/MultiMarkdownTest/MultiMarkdownTests/French.tex +18 -0
  173. data/test/MultiMarkdownTest/MultiMarkdownTests/French.text +17 -0
  174. data/test/MultiMarkdownTest/MultiMarkdownTests/German.html +25 -0
  175. data/test/MultiMarkdownTest/MultiMarkdownTests/German.tex +18 -0
  176. data/test/MultiMarkdownTest/MultiMarkdownTests/German.text +17 -0
  177. data/test/MultiMarkdownTest/MultiMarkdownTests/GermanGuillemets.html +25 -0
  178. data/test/MultiMarkdownTest/MultiMarkdownTests/GermanGuillemets.tex +18 -0
  179. data/test/MultiMarkdownTest/MultiMarkdownTests/GermanGuillemets.text +17 -0
  180. data/test/MultiMarkdownTest/MultiMarkdownTests/Glossary.html +48 -0
  181. data/test/MultiMarkdownTest/MultiMarkdownTests/Glossary.tex +26 -0
  182. data/test/MultiMarkdownTest/MultiMarkdownTests/Glossary.text +28 -0
  183. data/test/MultiMarkdownTest/MultiMarkdownTests/Headers.html +50 -0
  184. data/test/MultiMarkdownTest/MultiMarkdownTests/Headers.tex +54 -0
  185. data/test/MultiMarkdownTest/MultiMarkdownTests/Headers.text +51 -0
  186. data/test/MultiMarkdownTest/MultiMarkdownTests/Line Breaks.html +22 -0
  187. data/test/MultiMarkdownTest/MultiMarkdownTests/Line Breaks.tex +15 -0
  188. data/test/MultiMarkdownTest/MultiMarkdownTests/Line Breaks.text +15 -0
  189. data/test/MultiMarkdownTest/MultiMarkdownTests/Link Attributes.html +56 -0
  190. data/test/MultiMarkdownTest/MultiMarkdownTests/Link Attributes.tex +60 -0
  191. data/test/MultiMarkdownTest/MultiMarkdownTests/Link Attributes.text +50 -0
  192. data/test/MultiMarkdownTest/MultiMarkdownTests/List Parsing.html +22 -0
  193. data/test/MultiMarkdownTest/MultiMarkdownTests/List Parsing.tex +17 -0
  194. data/test/MultiMarkdownTest/MultiMarkdownTests/List Parsing.text +11 -0
  195. data/test/MultiMarkdownTest/MultiMarkdownTests/MarkdownInHTML.html +21 -0
  196. data/test/MultiMarkdownTest/MultiMarkdownTests/MarkdownInHTML.tex +13 -0
  197. data/test/MultiMarkdownTest/MultiMarkdownTests/MarkdownInHTML.text +19 -0
  198. data/test/MultiMarkdownTest/MultiMarkdownTests/Math.html +23 -0
  199. data/test/MultiMarkdownTest/MultiMarkdownTests/Math.tex +15 -0
  200. data/test/MultiMarkdownTest/MultiMarkdownTests/Math.text +15 -0
  201. data/test/MultiMarkdownTest/MultiMarkdownTests/MetaData.html +23 -0
  202. data/test/MultiMarkdownTest/MultiMarkdownTests/MetaData.tex +13 -0
  203. data/test/MultiMarkdownTest/MultiMarkdownTests/MetaData.text +14 -0
  204. data/test/MultiMarkdownTest/MultiMarkdownTests/NotMetaData.html +3 -0
  205. data/test/MultiMarkdownTest/MultiMarkdownTests/NotMetaData.tex +3 -0
  206. data/test/MultiMarkdownTest/MultiMarkdownTests/NotMetaData.text +4 -0
  207. data/test/MultiMarkdownTest/MultiMarkdownTests/Sanity.html +106 -0
  208. data/test/MultiMarkdownTest/MultiMarkdownTests/Sanity.tex +100 -0
  209. data/test/MultiMarkdownTest/MultiMarkdownTests/Sanity.text +77 -0
  210. data/test/MultiMarkdownTest/MultiMarkdownTests/SmartQuotes.html +31 -0
  211. data/test/MultiMarkdownTest/MultiMarkdownTests/SmartQuotes.tex +24 -0
  212. data/test/MultiMarkdownTest/MultiMarkdownTests/SmartQuotes.text +22 -0
  213. data/test/MultiMarkdownTest/MultiMarkdownTests/Swedish.html +25 -0
  214. data/test/MultiMarkdownTest/MultiMarkdownTests/Swedish.tex +18 -0
  215. data/test/MultiMarkdownTest/MultiMarkdownTests/Swedish.text +17 -0
  216. data/test/MultiMarkdownTest/MultiMarkdownTests/Tables.html +273 -0
  217. data/test/MultiMarkdownTest/MultiMarkdownTests/Tables.tex +155 -0
  218. data/test/MultiMarkdownTest/MultiMarkdownTests/Tables.text +71 -0
  219. data/test/MultiMarkdownTest/MultiMarkdownTests/bibtex.bib +119 -0
  220. data/test/MultiMarkdownTest/README.md +58 -0
  221. data/test/MultiMarkdownTest/Tests/Amps and angle encoding.html +17 -0
  222. data/test/MultiMarkdownTest/Tests/Amps and angle encoding.text +21 -0
  223. data/test/MultiMarkdownTest/Tests/Auto links.html +18 -0
  224. data/test/MultiMarkdownTest/Tests/Auto links.text +13 -0
  225. data/test/MultiMarkdownTest/Tests/Backslash escapes.html +118 -0
  226. data/test/MultiMarkdownTest/Tests/Backslash escapes.text +120 -0
  227. data/test/MultiMarkdownTest/Tests/Blockquotes with code blocks.html +15 -0
  228. data/test/MultiMarkdownTest/Tests/Blockquotes with code blocks.text +11 -0
  229. data/test/MultiMarkdownTest/Tests/Code Blocks.html +18 -0
  230. data/test/MultiMarkdownTest/Tests/Code Blocks.text +14 -0
  231. data/test/MultiMarkdownTest/Tests/Code Spans.html +6 -0
  232. data/test/MultiMarkdownTest/Tests/Code Spans.text +6 -0
  233. data/test/MultiMarkdownTest/Tests/Compatibility.html +5 -0
  234. data/test/MultiMarkdownTest/Tests/Compatibility.text +9 -0
  235. data/test/MultiMarkdownTest/Tests/Hard-wrapped paragraphs with list-like lines.html +8 -0
  236. data/test/MultiMarkdownTest/Tests/Hard-wrapped paragraphs with list-like lines.text +8 -0
  237. data/test/MultiMarkdownTest/Tests/Horizontal rules.html +71 -0
  238. data/test/MultiMarkdownTest/Tests/Horizontal rules.text +67 -0
  239. data/test/MultiMarkdownTest/Tests/Inline HTML (Advanced).html +15 -0
  240. data/test/MultiMarkdownTest/Tests/Inline HTML (Advanced).text +15 -0
  241. data/test/MultiMarkdownTest/Tests/Inline HTML (Simple).html +72 -0
  242. data/test/MultiMarkdownTest/Tests/Inline HTML (Simple).text +69 -0
  243. data/test/MultiMarkdownTest/Tests/Inline HTML comments.html +13 -0
  244. data/test/MultiMarkdownTest/Tests/Inline HTML comments.text +13 -0
  245. data/test/MultiMarkdownTest/Tests/Links, inline style.html +11 -0
  246. data/test/MultiMarkdownTest/Tests/Links, inline style.text +12 -0
  247. data/test/MultiMarkdownTest/Tests/Links, reference style.html +52 -0
  248. data/test/MultiMarkdownTest/Tests/Links, reference style.text +71 -0
  249. data/test/MultiMarkdownTest/Tests/Links, shortcut references.html +9 -0
  250. data/test/MultiMarkdownTest/Tests/Links, shortcut references.text +20 -0
  251. data/test/MultiMarkdownTest/Tests/Literal quotes in titles.html +3 -0
  252. data/test/MultiMarkdownTest/Tests/Literal quotes in titles.text +7 -0
  253. data/test/MultiMarkdownTest/Tests/Markdown Documentation - Basics.html +314 -0
  254. data/test/MultiMarkdownTest/Tests/Markdown Documentation - Basics.text +306 -0
  255. data/test/MultiMarkdownTest/Tests/Markdown Documentation - Syntax.html +942 -0
  256. data/test/MultiMarkdownTest/Tests/Markdown Documentation - Syntax.text +888 -0
  257. data/test/MultiMarkdownTest/Tests/Nested blockquotes.html +9 -0
  258. data/test/MultiMarkdownTest/Tests/Nested blockquotes.text +5 -0
  259. data/test/MultiMarkdownTest/Tests/Ordered and unordered lists.html +148 -0
  260. data/test/MultiMarkdownTest/Tests/Ordered and unordered lists.text +131 -0
  261. data/test/MultiMarkdownTest/Tests/Strong and em together.html +7 -0
  262. data/test/MultiMarkdownTest/Tests/Strong and em together.text +7 -0
  263. data/test/MultiMarkdownTest/Tests/Tabs.html +25 -0
  264. data/test/MultiMarkdownTest/Tests/Tabs.text +21 -0
  265. data/test/MultiMarkdownTest/Tests/Tidyness.html +8 -0
  266. data/test/MultiMarkdownTest/Tests/Tidyness.text +5 -0
  267. data/test/benchmark.rb +49 -0
  268. data/test/multimarkdown_test.rb +89 -0
  269. metadata +318 -0
@@ -0,0 +1,314 @@
1
+ <h1>Markdown: Basics</h1>
2
+
3
+ <ul id="ProjectSubmenu">
4
+ <li><a href="/projects/markdown/" title="Markdown Project Page">Main</a></li>
5
+ <li><a class="selected" title="Markdown Basics">Basics</a></li>
6
+ <li><a href="/projects/markdown/syntax" title="Markdown Syntax Documentation">Syntax</a></li>
7
+ <li><a href="/projects/markdown/license" title="Pricing and License Information">License</a></li>
8
+ <li><a href="/projects/markdown/dingus" title="Online Markdown Web Form">Dingus</a></li>
9
+ </ul>
10
+
11
+ <h2>Getting the Gist of Markdown's Formatting Syntax</h2>
12
+
13
+ <p>This page offers a brief overview of what it's like to use Markdown.
14
+ The <a href="/projects/markdown/syntax" title="Markdown Syntax">syntax page</a> provides complete, detailed documentation for
15
+ every feature, but Markdown should be very easy to pick up simply by
16
+ looking at a few examples of it in action. The examples on this page
17
+ are written in a before/after style, showing example syntax and the
18
+ HTML output produced by Markdown.</p>
19
+
20
+ <p>It's also helpful to simply try Markdown out; the <a href="/projects/markdown/dingus" title="Markdown Dingus">Dingus</a> is a
21
+ web application that allows you type your own Markdown-formatted text
22
+ and translate it to XHTML.</p>
23
+
24
+ <p><strong>Note:</strong> This document is itself written using Markdown; you
25
+ can <a href="/projects/markdown/basics.text">see the source for it by adding '.text' to the URL</a>.</p>
26
+
27
+ <h2>Paragraphs, Headers, Blockquotes</h2>
28
+
29
+ <p>A paragraph is simply one or more consecutive lines of text, separated
30
+ by one or more blank lines. (A blank line is any line that looks like a
31
+ blank line -- a line containing nothing spaces or tabs is considered
32
+ blank.) Normal paragraphs should not be intended with spaces or tabs.</p>
33
+
34
+ <p>Markdown offers two styles of headers: <em>Setext</em> and <em>atx</em>.
35
+ Setext-style headers for <code>&lt;h1&gt;</code> and <code>&lt;h2&gt;</code> are created by
36
+ "underlining" with equal signs (<code>=</code>) and hyphens (<code>-</code>), respectively.
37
+ To create an atx-style header, you put 1-6 hash marks (<code>#</code>) at the
38
+ beginning of the line -- the number of hashes equals the resulting
39
+ HTML header level.</p>
40
+
41
+ <p>Blockquotes are indicated using email-style '<code>&gt;</code>' angle brackets.</p>
42
+
43
+ <p>Markdown:</p>
44
+
45
+ <pre><code>A First Level Header
46
+ ====================
47
+
48
+ A Second Level Header
49
+ ---------------------
50
+
51
+ Now is the time for all good men to come to
52
+ the aid of their country. This is just a
53
+ regular paragraph.
54
+
55
+ The quick brown fox jumped over the lazy
56
+ dog's back.
57
+
58
+ ### Header 3
59
+
60
+ &gt; This is a blockquote.
61
+ &gt;
62
+ &gt; This is the second paragraph in the blockquote.
63
+ &gt;
64
+ &gt; ## This is an H2 in a blockquote
65
+ </code></pre>
66
+
67
+ <p>Output:</p>
68
+
69
+ <pre><code>&lt;h1&gt;A First Level Header&lt;/h1&gt;
70
+
71
+ &lt;h2&gt;A Second Level Header&lt;/h2&gt;
72
+
73
+ &lt;p&gt;Now is the time for all good men to come to
74
+ the aid of their country. This is just a
75
+ regular paragraph.&lt;/p&gt;
76
+
77
+ &lt;p&gt;The quick brown fox jumped over the lazy
78
+ dog's back.&lt;/p&gt;
79
+
80
+ &lt;h3&gt;Header 3&lt;/h3&gt;
81
+
82
+ &lt;blockquote&gt;
83
+ &lt;p&gt;This is a blockquote.&lt;/p&gt;
84
+
85
+ &lt;p&gt;This is the second paragraph in the blockquote.&lt;/p&gt;
86
+
87
+ &lt;h2&gt;This is an H2 in a blockquote&lt;/h2&gt;
88
+ &lt;/blockquote&gt;
89
+ </code></pre>
90
+
91
+ <h3>Phrase Emphasis</h3>
92
+
93
+ <p>Markdown uses asterisks and underscores to indicate spans of emphasis.</p>
94
+
95
+ <p>Markdown:</p>
96
+
97
+ <pre><code>Some of these words *are emphasized*.
98
+ Some of these words _are emphasized also_.
99
+
100
+ Use two asterisks for **strong emphasis**.
101
+ Or, if you prefer, __use two underscores instead__.
102
+ </code></pre>
103
+
104
+ <p>Output:</p>
105
+
106
+ <pre><code>&lt;p&gt;Some of these words &lt;em&gt;are emphasized&lt;/em&gt;.
107
+ Some of these words &lt;em&gt;are emphasized also&lt;/em&gt;.&lt;/p&gt;
108
+
109
+ &lt;p&gt;Use two asterisks for &lt;strong&gt;strong emphasis&lt;/strong&gt;.
110
+ Or, if you prefer, &lt;strong&gt;use two underscores instead&lt;/strong&gt;.&lt;/p&gt;
111
+ </code></pre>
112
+
113
+ <h2>Lists</h2>
114
+
115
+ <p>Unordered (bulleted) lists use asterisks, pluses, and hyphens (<code>*</code>,
116
+ <code>+</code>, and <code>-</code>) as list markers. These three markers are
117
+ interchangable; this:</p>
118
+
119
+ <pre><code>* Candy.
120
+ * Gum.
121
+ * Booze.
122
+ </code></pre>
123
+
124
+ <p>this:</p>
125
+
126
+ <pre><code>+ Candy.
127
+ + Gum.
128
+ + Booze.
129
+ </code></pre>
130
+
131
+ <p>and this:</p>
132
+
133
+ <pre><code>- Candy.
134
+ - Gum.
135
+ - Booze.
136
+ </code></pre>
137
+
138
+ <p>all produce the same output:</p>
139
+
140
+ <pre><code>&lt;ul&gt;
141
+ &lt;li&gt;Candy.&lt;/li&gt;
142
+ &lt;li&gt;Gum.&lt;/li&gt;
143
+ &lt;li&gt;Booze.&lt;/li&gt;
144
+ &lt;/ul&gt;
145
+ </code></pre>
146
+
147
+ <p>Ordered (numbered) lists use regular numbers, followed by periods, as
148
+ list markers:</p>
149
+
150
+ <pre><code>1. Red
151
+ 2. Green
152
+ 3. Blue
153
+ </code></pre>
154
+
155
+ <p>Output:</p>
156
+
157
+ <pre><code>&lt;ol&gt;
158
+ &lt;li&gt;Red&lt;/li&gt;
159
+ &lt;li&gt;Green&lt;/li&gt;
160
+ &lt;li&gt;Blue&lt;/li&gt;
161
+ &lt;/ol&gt;
162
+ </code></pre>
163
+
164
+ <p>If you put blank lines between items, you'll get <code>&lt;p&gt;</code> tags for the
165
+ list item text. You can create multi-paragraph list items by indenting
166
+ the paragraphs by 4 spaces or 1 tab:</p>
167
+
168
+ <pre><code>* A list item.
169
+
170
+ With multiple paragraphs.
171
+
172
+ * Another item in the list.
173
+ </code></pre>
174
+
175
+ <p>Output:</p>
176
+
177
+ <pre><code>&lt;ul&gt;
178
+ &lt;li&gt;&lt;p&gt;A list item.&lt;/p&gt;
179
+ &lt;p&gt;With multiple paragraphs.&lt;/p&gt;&lt;/li&gt;
180
+ &lt;li&gt;&lt;p&gt;Another item in the list.&lt;/p&gt;&lt;/li&gt;
181
+ &lt;/ul&gt;
182
+ </code></pre>
183
+
184
+ <h3>Links</h3>
185
+
186
+ <p>Markdown supports two styles for creating links: <em>inline</em> and
187
+ <em>reference</em>. With both styles, you use square brackets to delimit the
188
+ text you want to turn into a link.</p>
189
+
190
+ <p>Inline-style links use parentheses immediately after the link text.
191
+ For example:</p>
192
+
193
+ <pre><code>This is an [example link](http://example.com/).
194
+ </code></pre>
195
+
196
+ <p>Output:</p>
197
+
198
+ <pre><code>&lt;p&gt;This is an &lt;a href="http://example.com/"&gt;
199
+ example link&lt;/a&gt;.&lt;/p&gt;
200
+ </code></pre>
201
+
202
+ <p>Optionally, you may include a title attribute in the parentheses:</p>
203
+
204
+ <pre><code>This is an [example link](http://example.com/ "With a Title").
205
+ </code></pre>
206
+
207
+ <p>Output:</p>
208
+
209
+ <pre><code>&lt;p&gt;This is an &lt;a href="http://example.com/" title="With a Title"&gt;
210
+ example link&lt;/a&gt;.&lt;/p&gt;
211
+ </code></pre>
212
+
213
+ <p>Reference-style links allow you to refer to your links by names, which
214
+ you define elsewhere in your document:</p>
215
+
216
+ <pre><code>I get 10 times more traffic from [Google][1] than from
217
+ [Yahoo][2] or [MSN][3].
218
+
219
+ [1]: http://google.com/ "Google"
220
+ [2]: http://search.yahoo.com/ "Yahoo Search"
221
+ [3]: http://search.msn.com/ "MSN Search"
222
+ </code></pre>
223
+
224
+ <p>Output:</p>
225
+
226
+ <pre><code>&lt;p&gt;I get 10 times more traffic from &lt;a href="http://google.com/"
227
+ title="Google"&gt;Google&lt;/a&gt; than from &lt;a href="http://search.yahoo.com/"
228
+ title="Yahoo Search"&gt;Yahoo&lt;/a&gt; or &lt;a href="http://search.msn.com/"
229
+ title="MSN Search"&gt;MSN&lt;/a&gt;.&lt;/p&gt;
230
+ </code></pre>
231
+
232
+ <p>The title attribute is optional. Link names may contain letters,
233
+ numbers and spaces, but are <em>not</em> case sensitive:</p>
234
+
235
+ <pre><code>I start my morning with a cup of coffee and
236
+ [The New York Times][NY Times].
237
+
238
+ [ny times]: http://www.nytimes.com/
239
+ </code></pre>
240
+
241
+ <p>Output:</p>
242
+
243
+ <pre><code>&lt;p&gt;I start my morning with a cup of coffee and
244
+ &lt;a href="http://www.nytimes.com/"&gt;The New York Times&lt;/a&gt;.&lt;/p&gt;
245
+ </code></pre>
246
+
247
+ <h3>Images</h3>
248
+
249
+ <p>Image syntax is very much like link syntax.</p>
250
+
251
+ <p>Inline (titles are optional):</p>
252
+
253
+ <pre><code>![alt text](/path/to/img.jpg "Title")
254
+ </code></pre>
255
+
256
+ <p>Reference-style:</p>
257
+
258
+ <pre><code>![alt text][id]
259
+
260
+ [id]: /path/to/img.jpg "Title"
261
+ </code></pre>
262
+
263
+ <p>Both of the above examples produce the same output:</p>
264
+
265
+ <pre><code>&lt;img src="/path/to/img.jpg" alt="alt text" title="Title" /&gt;
266
+ </code></pre>
267
+
268
+ <h3>Code</h3>
269
+
270
+ <p>In a regular paragraph, you can create code span by wrapping text in
271
+ backtick quotes. Any ampersands (<code>&amp;</code>) and angle brackets (<code>&lt;</code> or
272
+ <code>&gt;</code>) will automatically be translated into HTML entities. This makes
273
+ it easy to use Markdown to write about HTML example code:</p>
274
+
275
+ <pre><code>I strongly recommend against using any `&lt;blink&gt;` tags.
276
+
277
+ I wish SmartyPants used named entities like `&amp;mdash;`
278
+ instead of decimal-encoded entites like `&amp;#8212;`.
279
+ </code></pre>
280
+
281
+ <p>Output:</p>
282
+
283
+ <pre><code>&lt;p&gt;I strongly recommend against using any
284
+ &lt;code&gt;&amp;lt;blink&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;
285
+
286
+ &lt;p&gt;I wish SmartyPants used named entities like
287
+ &lt;code&gt;&amp;amp;mdash;&lt;/code&gt; instead of decimal-encoded
288
+ entites like &lt;code&gt;&amp;amp;#8212;&lt;/code&gt;.&lt;/p&gt;
289
+ </code></pre>
290
+
291
+ <p>To specify an entire block of pre-formatted code, indent every line of
292
+ the block by 4 spaces or 1 tab. Just like with code spans, <code>&amp;</code>, <code>&lt;</code>,
293
+ and <code>&gt;</code> characters will be escaped automatically.</p>
294
+
295
+ <p>Markdown:</p>
296
+
297
+ <pre><code>If you want your page to validate under XHTML 1.0 Strict,
298
+ you've got to put paragraph tags in your blockquotes:
299
+
300
+ &lt;blockquote&gt;
301
+ &lt;p&gt;For example.&lt;/p&gt;
302
+ &lt;/blockquote&gt;
303
+ </code></pre>
304
+
305
+ <p>Output:</p>
306
+
307
+ <pre><code>&lt;p&gt;If you want your page to validate under XHTML 1.0 Strict,
308
+ you've got to put paragraph tags in your blockquotes:&lt;/p&gt;
309
+
310
+ &lt;pre&gt;&lt;code&gt;&amp;lt;blockquote&amp;gt;
311
+ &amp;lt;p&amp;gt;For example.&amp;lt;/p&amp;gt;
312
+ &amp;lt;/blockquote&amp;gt;
313
+ &lt;/code&gt;&lt;/pre&gt;
314
+ </code></pre>
@@ -0,0 +1,306 @@
1
+ Markdown: Basics
2
+ ================
3
+
4
+ <ul id="ProjectSubmenu">
5
+ <li><a href="/projects/markdown/" title="Markdown Project Page">Main</a></li>
6
+ <li><a class="selected" title="Markdown Basics">Basics</a></li>
7
+ <li><a href="/projects/markdown/syntax" title="Markdown Syntax Documentation">Syntax</a></li>
8
+ <li><a href="/projects/markdown/license" title="Pricing and License Information">License</a></li>
9
+ <li><a href="/projects/markdown/dingus" title="Online Markdown Web Form">Dingus</a></li>
10
+ </ul>
11
+
12
+
13
+ Getting the Gist of Markdown's Formatting Syntax
14
+ ------------------------------------------------
15
+
16
+ This page offers a brief overview of what it's like to use Markdown.
17
+ The [syntax page] [s] provides complete, detailed documentation for
18
+ every feature, but Markdown should be very easy to pick up simply by
19
+ looking at a few examples of it in action. The examples on this page
20
+ are written in a before/after style, showing example syntax and the
21
+ HTML output produced by Markdown.
22
+
23
+ It's also helpful to simply try Markdown out; the [Dingus] [d] is a
24
+ web application that allows you type your own Markdown-formatted text
25
+ and translate it to XHTML.
26
+
27
+ **Note:** This document is itself written using Markdown; you
28
+ can [see the source for it by adding '.text' to the URL] [src].
29
+
30
+ [s]: /projects/markdown/syntax "Markdown Syntax"
31
+ [d]: /projects/markdown/dingus "Markdown Dingus"
32
+ [src]: /projects/markdown/basics.text
33
+
34
+
35
+ ## Paragraphs, Headers, Blockquotes ##
36
+
37
+ A paragraph is simply one or more consecutive lines of text, separated
38
+ by one or more blank lines. (A blank line is any line that looks like a
39
+ blank line -- a line containing nothing spaces or tabs is considered
40
+ blank.) Normal paragraphs should not be intended with spaces or tabs.
41
+
42
+ Markdown offers two styles of headers: *Setext* and *atx*.
43
+ Setext-style headers for `<h1>` and `<h2>` are created by
44
+ "underlining" with equal signs (`=`) and hyphens (`-`), respectively.
45
+ To create an atx-style header, you put 1-6 hash marks (`#`) at the
46
+ beginning of the line -- the number of hashes equals the resulting
47
+ HTML header level.
48
+
49
+ Blockquotes are indicated using email-style '`>`' angle brackets.
50
+
51
+ Markdown:
52
+
53
+ A First Level Header
54
+ ====================
55
+
56
+ A Second Level Header
57
+ ---------------------
58
+
59
+ Now is the time for all good men to come to
60
+ the aid of their country. This is just a
61
+ regular paragraph.
62
+
63
+ The quick brown fox jumped over the lazy
64
+ dog's back.
65
+
66
+ ### Header 3
67
+
68
+ > This is a blockquote.
69
+ >
70
+ > This is the second paragraph in the blockquote.
71
+ >
72
+ > ## This is an H2 in a blockquote
73
+
74
+
75
+ Output:
76
+
77
+ <h1>A First Level Header</h1>
78
+
79
+ <h2>A Second Level Header</h2>
80
+
81
+ <p>Now is the time for all good men to come to
82
+ the aid of their country. This is just a
83
+ regular paragraph.</p>
84
+
85
+ <p>The quick brown fox jumped over the lazy
86
+ dog's back.</p>
87
+
88
+ <h3>Header 3</h3>
89
+
90
+ <blockquote>
91
+ <p>This is a blockquote.</p>
92
+
93
+ <p>This is the second paragraph in the blockquote.</p>
94
+
95
+ <h2>This is an H2 in a blockquote</h2>
96
+ </blockquote>
97
+
98
+
99
+
100
+ ### Phrase Emphasis ###
101
+
102
+ Markdown uses asterisks and underscores to indicate spans of emphasis.
103
+
104
+ Markdown:
105
+
106
+ Some of these words *are emphasized*.
107
+ Some of these words _are emphasized also_.
108
+
109
+ Use two asterisks for **strong emphasis**.
110
+ Or, if you prefer, __use two underscores instead__.
111
+
112
+ Output:
113
+
114
+ <p>Some of these words <em>are emphasized</em>.
115
+ Some of these words <em>are emphasized also</em>.</p>
116
+
117
+ <p>Use two asterisks for <strong>strong emphasis</strong>.
118
+ Or, if you prefer, <strong>use two underscores instead</strong>.</p>
119
+
120
+
121
+
122
+ ## Lists ##
123
+
124
+ Unordered (bulleted) lists use asterisks, pluses, and hyphens (`*`,
125
+ `+`, and `-`) as list markers. These three markers are
126
+ interchangable; this:
127
+
128
+ * Candy.
129
+ * Gum.
130
+ * Booze.
131
+
132
+ this:
133
+
134
+ + Candy.
135
+ + Gum.
136
+ + Booze.
137
+
138
+ and this:
139
+
140
+ - Candy.
141
+ - Gum.
142
+ - Booze.
143
+
144
+ all produce the same output:
145
+
146
+ <ul>
147
+ <li>Candy.</li>
148
+ <li>Gum.</li>
149
+ <li>Booze.</li>
150
+ </ul>
151
+
152
+ Ordered (numbered) lists use regular numbers, followed by periods, as
153
+ list markers:
154
+
155
+ 1. Red
156
+ 2. Green
157
+ 3. Blue
158
+
159
+ Output:
160
+
161
+ <ol>
162
+ <li>Red</li>
163
+ <li>Green</li>
164
+ <li>Blue</li>
165
+ </ol>
166
+
167
+ If you put blank lines between items, you'll get `<p>` tags for the
168
+ list item text. You can create multi-paragraph list items by indenting
169
+ the paragraphs by 4 spaces or 1 tab:
170
+
171
+ * A list item.
172
+
173
+ With multiple paragraphs.
174
+
175
+ * Another item in the list.
176
+
177
+ Output:
178
+
179
+ <ul>
180
+ <li><p>A list item.</p>
181
+ <p>With multiple paragraphs.</p></li>
182
+ <li><p>Another item in the list.</p></li>
183
+ </ul>
184
+
185
+
186
+
187
+ ### Links ###
188
+
189
+ Markdown supports two styles for creating links: *inline* and
190
+ *reference*. With both styles, you use square brackets to delimit the
191
+ text you want to turn into a link.
192
+
193
+ Inline-style links use parentheses immediately after the link text.
194
+ For example:
195
+
196
+ This is an [example link](http://example.com/).
197
+
198
+ Output:
199
+
200
+ <p>This is an <a href="http://example.com/">
201
+ example link</a>.</p>
202
+
203
+ Optionally, you may include a title attribute in the parentheses:
204
+
205
+ This is an [example link](http://example.com/ "With a Title").
206
+
207
+ Output:
208
+
209
+ <p>This is an <a href="http://example.com/" title="With a Title">
210
+ example link</a>.</p>
211
+
212
+ Reference-style links allow you to refer to your links by names, which
213
+ you define elsewhere in your document:
214
+
215
+ I get 10 times more traffic from [Google][1] than from
216
+ [Yahoo][2] or [MSN][3].
217
+
218
+ [1]: http://google.com/ "Google"
219
+ [2]: http://search.yahoo.com/ "Yahoo Search"
220
+ [3]: http://search.msn.com/ "MSN Search"
221
+
222
+ Output:
223
+
224
+ <p>I get 10 times more traffic from <a href="http://google.com/"
225
+ title="Google">Google</a> than from <a href="http://search.yahoo.com/"
226
+ title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
227
+ title="MSN Search">MSN</a>.</p>
228
+
229
+ The title attribute is optional. Link names may contain letters,
230
+ numbers and spaces, but are *not* case sensitive:
231
+
232
+ I start my morning with a cup of coffee and
233
+ [The New York Times][NY Times].
234
+
235
+ [ny times]: http://www.nytimes.com/
236
+
237
+ Output:
238
+
239
+ <p>I start my morning with a cup of coffee and
240
+ <a href="http://www.nytimes.com/">The New York Times</a>.</p>
241
+
242
+
243
+ ### Images ###
244
+
245
+ Image syntax is very much like link syntax.
246
+
247
+ Inline (titles are optional):
248
+
249
+ ![alt text](/path/to/img.jpg "Title")
250
+
251
+ Reference-style:
252
+
253
+ ![alt text][id]
254
+
255
+ [id]: /path/to/img.jpg "Title"
256
+
257
+ Both of the above examples produce the same output:
258
+
259
+ <img src="/path/to/img.jpg" alt="alt text" title="Title" />
260
+
261
+
262
+
263
+ ### Code ###
264
+
265
+ In a regular paragraph, you can create code span by wrapping text in
266
+ backtick quotes. Any ampersands (`&`) and angle brackets (`<` or
267
+ `>`) will automatically be translated into HTML entities. This makes
268
+ it easy to use Markdown to write about HTML example code:
269
+
270
+ I strongly recommend against using any `<blink>` tags.
271
+
272
+ I wish SmartyPants used named entities like `&mdash;`
273
+ instead of decimal-encoded entites like `&#8212;`.
274
+
275
+ Output:
276
+
277
+ <p>I strongly recommend against using any
278
+ <code>&lt;blink&gt;</code> tags.</p>
279
+
280
+ <p>I wish SmartyPants used named entities like
281
+ <code>&amp;mdash;</code> instead of decimal-encoded
282
+ entites like <code>&amp;#8212;</code>.</p>
283
+
284
+
285
+ To specify an entire block of pre-formatted code, indent every line of
286
+ the block by 4 spaces or 1 tab. Just like with code spans, `&`, `<`,
287
+ and `>` characters will be escaped automatically.
288
+
289
+ Markdown:
290
+
291
+ If you want your page to validate under XHTML 1.0 Strict,
292
+ you've got to put paragraph tags in your blockquotes:
293
+
294
+ <blockquote>
295
+ <p>For example.</p>
296
+ </blockquote>
297
+
298
+ Output:
299
+
300
+ <p>If you want your page to validate under XHTML 1.0 Strict,
301
+ you've got to put paragraph tags in your blockquotes:</p>
302
+
303
+ <pre><code>&lt;blockquote&gt;
304
+ &lt;p&gt;For example.&lt;/p&gt;
305
+ &lt;/blockquote&gt;
306
+ </code></pre>