rdoc 4.2.1 → 6.3.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rdoc might be problematic. Click here for more details.

Files changed (277) hide show
  1. checksums.yaml +5 -5
  2. data/CONTRIBUTING.rdoc +8 -7
  3. data/Gemfile +12 -0
  4. data/History.rdoc +48 -4
  5. data/LEGAL.rdoc +2 -2
  6. data/README.rdoc +5 -5
  7. data/Rakefile +73 -155
  8. data/bin/console +7 -0
  9. data/bin/setup +6 -0
  10. data/{bin → exe}/rdoc +0 -0
  11. data/{bin → exe}/ri +0 -0
  12. data/lib/rdoc/alias.rb +1 -0
  13. data/lib/rdoc/anon_class.rb +1 -0
  14. data/lib/rdoc/any_method.rb +59 -14
  15. data/lib/rdoc/attr.rb +1 -0
  16. data/lib/rdoc/class_module.rb +5 -2
  17. data/lib/rdoc/code_object.rb +3 -11
  18. data/lib/rdoc/code_objects.rb +1 -0
  19. data/lib/rdoc/comment.rb +32 -11
  20. data/lib/rdoc/constant.rb +3 -2
  21. data/lib/rdoc/context/section.rb +7 -13
  22. data/lib/rdoc/context.rb +78 -23
  23. data/lib/rdoc/cross_reference.rb +33 -14
  24. data/lib/rdoc/encoding.rb +92 -55
  25. data/lib/rdoc/erb_partial.rb +2 -1
  26. data/lib/rdoc/erbio.rb +8 -3
  27. data/lib/rdoc/extend.rb +1 -0
  28. data/lib/rdoc/generator/darkfish.rb +62 -32
  29. data/lib/rdoc/generator/json_index.rb +8 -5
  30. data/lib/rdoc/generator/markup.rb +3 -12
  31. data/lib/rdoc/generator/pot/message_extractor.rb +68 -0
  32. data/lib/rdoc/generator/pot/po.rb +84 -0
  33. data/lib/rdoc/generator/pot/po_entry.rb +141 -0
  34. data/lib/rdoc/generator/pot.rb +4 -3
  35. data/lib/rdoc/generator/ri.rb +1 -0
  36. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +2 -2
  37. data/lib/rdoc/generator/template/darkfish/_head.rhtml +11 -8
  38. data/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +2 -2
  39. data/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +2 -2
  40. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +7 -7
  41. data/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +2 -2
  42. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +7 -7
  43. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +6 -6
  44. data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +5 -5
  45. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +5 -5
  46. data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +5 -5
  47. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +4 -4
  48. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +4 -4
  49. data/lib/rdoc/generator/template/darkfish/class.rhtml +45 -47
  50. data/lib/rdoc/generator/template/darkfish/css/fonts.css +6 -6
  51. data/lib/rdoc/generator/template/darkfish/css/rdoc.css +55 -6
  52. data/lib/rdoc/generator/template/darkfish/index.rhtml +3 -4
  53. data/lib/rdoc/generator/template/darkfish/js/darkfish.js +23 -100
  54. data/lib/rdoc/generator/template/darkfish/js/search.js +32 -31
  55. data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +15 -16
  56. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +16 -16
  57. data/lib/rdoc/generator/template/json_index/js/navigation.js +4 -41
  58. data/lib/rdoc/generator/template/json_index/js/searcher.js +7 -6
  59. data/lib/rdoc/generator.rb +1 -1
  60. data/lib/rdoc/ghost_method.rb +1 -0
  61. data/lib/rdoc/i18n/locale.rb +2 -1
  62. data/lib/rdoc/i18n/text.rb +5 -4
  63. data/lib/rdoc/i18n.rb +3 -2
  64. data/lib/rdoc/include.rb +1 -0
  65. data/lib/rdoc/known_classes.rb +1 -0
  66. data/lib/rdoc/markdown/entities.rb +1 -0
  67. data/lib/rdoc/markdown/{literals_1_9.kpeg → literals.kpeg} +1 -0
  68. data/lib/rdoc/markdown/{literals_1_9.rb → literals.rb} +1 -4
  69. data/lib/rdoc/markdown.kpeg +94 -51
  70. data/lib/rdoc/markdown.rb +1171 -619
  71. data/lib/rdoc/markup/attr_changer.rb +1 -0
  72. data/lib/rdoc/markup/attr_span.rb +9 -2
  73. data/lib/rdoc/markup/attribute_manager.rb +115 -49
  74. data/lib/rdoc/markup/attributes.rb +7 -6
  75. data/lib/rdoc/markup/blank_line.rb +1 -0
  76. data/lib/rdoc/markup/block_quote.rb +1 -0
  77. data/lib/rdoc/markup/document.rb +1 -0
  78. data/lib/rdoc/markup/formatter.rb +25 -23
  79. data/lib/rdoc/markup/hard_break.rb +1 -0
  80. data/lib/rdoc/markup/heading.rb +4 -3
  81. data/lib/rdoc/markup/include.rb +1 -0
  82. data/lib/rdoc/markup/indented_paragraph.rb +1 -0
  83. data/lib/rdoc/markup/list.rb +1 -0
  84. data/lib/rdoc/markup/list_item.rb +1 -0
  85. data/lib/rdoc/markup/paragraph.rb +1 -0
  86. data/lib/rdoc/markup/parser.rb +78 -61
  87. data/lib/rdoc/markup/pre_process.rb +12 -9
  88. data/lib/rdoc/markup/raw.rb +1 -0
  89. data/lib/rdoc/markup/regexp_handling.rb +41 -0
  90. data/lib/rdoc/markup/rule.rb +1 -0
  91. data/lib/rdoc/markup/to_ansi.rb +1 -0
  92. data/lib/rdoc/markup/to_bs.rb +4 -5
  93. data/lib/rdoc/markup/to_html.rb +71 -25
  94. data/lib/rdoc/markup/to_html_crossref.rb +41 -25
  95. data/lib/rdoc/markup/to_html_snippet.rb +10 -9
  96. data/lib/rdoc/markup/to_joined_paragraph.rb +7 -31
  97. data/lib/rdoc/markup/to_label.rb +10 -9
  98. data/lib/rdoc/markup/to_markdown.rb +9 -8
  99. data/lib/rdoc/markup/to_rdoc.rb +35 -6
  100. data/lib/rdoc/markup/to_table_of_contents.rb +2 -0
  101. data/lib/rdoc/markup/to_test.rb +1 -0
  102. data/lib/rdoc/markup/to_tt_only.rb +3 -2
  103. data/lib/rdoc/markup/verbatim.rb +1 -0
  104. data/lib/rdoc/markup.rb +14 -16
  105. data/lib/rdoc/meta_method.rb +1 -0
  106. data/lib/rdoc/method_attr.rb +2 -1
  107. data/lib/rdoc/mixin.rb +1 -0
  108. data/lib/rdoc/normal_class.rb +3 -2
  109. data/lib/rdoc/normal_module.rb +1 -0
  110. data/lib/rdoc/options.rb +92 -58
  111. data/lib/rdoc/parser/c.rb +219 -223
  112. data/lib/rdoc/parser/changelog.rb +155 -18
  113. data/lib/rdoc/parser/markdown.rb +1 -0
  114. data/lib/rdoc/parser/rd.rb +1 -0
  115. data/lib/rdoc/parser/ripper_state_lex.rb +590 -0
  116. data/lib/rdoc/parser/ruby.rb +635 -468
  117. data/lib/rdoc/parser/ruby_tools.rb +33 -33
  118. data/lib/rdoc/parser/simple.rb +3 -3
  119. data/lib/rdoc/parser/text.rb +1 -0
  120. data/lib/rdoc/parser.rb +17 -50
  121. data/lib/rdoc/rd/block_parser.rb +66 -65
  122. data/lib/rdoc/rd/block_parser.ry +3 -3
  123. data/lib/rdoc/rd/inline.rb +5 -4
  124. data/lib/rdoc/rd/inline_parser.rb +52 -51
  125. data/lib/rdoc/rd/inline_parser.ry +1 -1
  126. data/lib/rdoc/rd.rb +1 -0
  127. data/lib/rdoc/rdoc.rb +68 -63
  128. data/lib/rdoc/require.rb +1 -0
  129. data/lib/rdoc/ri/driver.rb +133 -58
  130. data/lib/rdoc/ri/formatter.rb +1 -0
  131. data/lib/rdoc/ri/paths.rb +4 -20
  132. data/lib/rdoc/ri/store.rb +1 -0
  133. data/lib/rdoc/ri/task.rb +71 -0
  134. data/lib/rdoc/ri.rb +1 -0
  135. data/lib/rdoc/rubygems_hook.rb +5 -12
  136. data/lib/rdoc/servlet.rb +24 -14
  137. data/lib/rdoc/single_class.rb +1 -0
  138. data/lib/rdoc/stats/normal.rb +20 -21
  139. data/lib/rdoc/stats/quiet.rb +1 -0
  140. data/lib/rdoc/stats/verbose.rb +1 -0
  141. data/lib/rdoc/stats.rb +1 -0
  142. data/lib/rdoc/store.rb +41 -41
  143. data/lib/rdoc/task.rb +2 -3
  144. data/lib/rdoc/text.rb +19 -38
  145. data/lib/rdoc/token_stream.rb +56 -32
  146. data/lib/rdoc/tom_doc.rb +17 -11
  147. data/lib/rdoc/top_level.rb +9 -2
  148. data/lib/rdoc/version.rb +8 -0
  149. data/lib/rdoc.rb +24 -10
  150. data/man/ri.1 +247 -0
  151. data/rdoc.gemspec +248 -0
  152. metadata +43 -236
  153. data/.autotest +0 -24
  154. data/.document +0 -5
  155. data/Manifest.txt +0 -306
  156. data/lib/gauntlet_rdoc.rb +0 -84
  157. data/lib/rdoc/generator/template/darkfish/js/jquery.js +0 -4
  158. data/lib/rdoc/markdown/literals_1_8.kpeg +0 -18
  159. data/lib/rdoc/markdown/literals_1_8.rb +0 -416
  160. data/lib/rdoc/markup/formatter_test_case.rb +0 -767
  161. data/lib/rdoc/markup/inline.rb +0 -1
  162. data/lib/rdoc/markup/special.rb +0 -40
  163. data/lib/rdoc/markup/text_formatter_test_case.rb +0 -114
  164. data/lib/rdoc/ruby_lex.rb +0 -1377
  165. data/lib/rdoc/ruby_token.rb +0 -460
  166. data/lib/rdoc/test_case.rb +0 -217
  167. data/test/MarkdownTest_1.0.3/Amps and angle encoding.text +0 -21
  168. data/test/MarkdownTest_1.0.3/Auto links.text +0 -13
  169. data/test/MarkdownTest_1.0.3/Backslash escapes.text +0 -120
  170. data/test/MarkdownTest_1.0.3/Blockquotes with code blocks.text +0 -11
  171. data/test/MarkdownTest_1.0.3/Code Blocks.text +0 -14
  172. data/test/MarkdownTest_1.0.3/Code Spans.text +0 -6
  173. data/test/MarkdownTest_1.0.3/Hard-wrapped paragraphs with list-like lines.text +0 -8
  174. data/test/MarkdownTest_1.0.3/Horizontal rules.text +0 -67
  175. data/test/MarkdownTest_1.0.3/Inline HTML (Advanced).text +0 -15
  176. data/test/MarkdownTest_1.0.3/Inline HTML (Simple).text +0 -69
  177. data/test/MarkdownTest_1.0.3/Inline HTML comments.text +0 -13
  178. data/test/MarkdownTest_1.0.3/Links, inline style.text +0 -12
  179. data/test/MarkdownTest_1.0.3/Links, reference style.text +0 -71
  180. data/test/MarkdownTest_1.0.3/Links, shortcut references.text +0 -20
  181. data/test/MarkdownTest_1.0.3/Literal quotes in titles.text +0 -7
  182. data/test/MarkdownTest_1.0.3/Markdown Documentation - Basics.text +0 -306
  183. data/test/MarkdownTest_1.0.3/Markdown Documentation - Syntax.text +0 -888
  184. data/test/MarkdownTest_1.0.3/Nested blockquotes.text +0 -5
  185. data/test/MarkdownTest_1.0.3/Ordered and unordered lists.text +0 -131
  186. data/test/MarkdownTest_1.0.3/Strong and em together.text +0 -7
  187. data/test/MarkdownTest_1.0.3/Tabs.text +0 -21
  188. data/test/MarkdownTest_1.0.3/Tidyness.text +0 -5
  189. data/test/README +0 -1
  190. data/test/binary.dat +0 -0
  191. data/test/hidden.zip.txt +0 -1
  192. data/test/test.ja.largedoc +0 -3
  193. data/test/test.ja.rdoc +0 -10
  194. data/test/test.ja.txt +0 -8
  195. data/test/test.txt +0 -1
  196. data/test/test_rdoc_alias.rb +0 -13
  197. data/test/test_rdoc_any_method.rb +0 -460
  198. data/test/test_rdoc_attr.rb +0 -190
  199. data/test/test_rdoc_class_module.rb +0 -1492
  200. data/test/test_rdoc_code_object.rb +0 -450
  201. data/test/test_rdoc_comment.rb +0 -504
  202. data/test/test_rdoc_constant.rb +0 -181
  203. data/test/test_rdoc_context.rb +0 -901
  204. data/test/test_rdoc_context_section.rb +0 -130
  205. data/test/test_rdoc_cross_reference.rb +0 -192
  206. data/test/test_rdoc_encoding.rb +0 -227
  207. data/test/test_rdoc_extend.rb +0 -94
  208. data/test/test_rdoc_generator_darkfish.rb +0 -229
  209. data/test/test_rdoc_generator_json_index.rb +0 -324
  210. data/test/test_rdoc_generator_markup.rb +0 -59
  211. data/test/test_rdoc_generator_pot.rb +0 -91
  212. data/test/test_rdoc_generator_pot_po.rb +0 -51
  213. data/test/test_rdoc_generator_pot_po_entry.rb +0 -139
  214. data/test/test_rdoc_generator_ri.rb +0 -78
  215. data/test/test_rdoc_i18n_locale.rb +0 -73
  216. data/test/test_rdoc_i18n_text.rb +0 -123
  217. data/test/test_rdoc_include.rb +0 -108
  218. data/test/test_rdoc_markdown.rb +0 -980
  219. data/test/test_rdoc_markdown_test.rb +0 -1884
  220. data/test/test_rdoc_markup.rb +0 -95
  221. data/test/test_rdoc_markup_attribute_manager.rb +0 -364
  222. data/test/test_rdoc_markup_attributes.rb +0 -39
  223. data/test/test_rdoc_markup_document.rb +0 -207
  224. data/test/test_rdoc_markup_formatter.rb +0 -175
  225. data/test/test_rdoc_markup_hard_break.rb +0 -31
  226. data/test/test_rdoc_markup_heading.rb +0 -29
  227. data/test/test_rdoc_markup_include.rb +0 -19
  228. data/test/test_rdoc_markup_indented_paragraph.rb +0 -53
  229. data/test/test_rdoc_markup_paragraph.rb +0 -32
  230. data/test/test_rdoc_markup_parser.rb +0 -1680
  231. data/test/test_rdoc_markup_pre_process.rb +0 -473
  232. data/test/test_rdoc_markup_raw.rb +0 -22
  233. data/test/test_rdoc_markup_to_ansi.rb +0 -369
  234. data/test/test_rdoc_markup_to_bs.rb +0 -366
  235. data/test/test_rdoc_markup_to_html.rb +0 -662
  236. data/test/test_rdoc_markup_to_html_crossref.rb +0 -225
  237. data/test/test_rdoc_markup_to_html_snippet.rb +0 -711
  238. data/test/test_rdoc_markup_to_joined_paragraph.rb +0 -32
  239. data/test/test_rdoc_markup_to_label.rb +0 -112
  240. data/test/test_rdoc_markup_to_markdown.rb +0 -389
  241. data/test/test_rdoc_markup_to_rdoc.rb +0 -377
  242. data/test/test_rdoc_markup_to_table_of_contents.rb +0 -126
  243. data/test/test_rdoc_markup_to_tt_only.rb +0 -246
  244. data/test/test_rdoc_markup_verbatim.rb +0 -29
  245. data/test/test_rdoc_method_attr.rb +0 -193
  246. data/test/test_rdoc_normal_class.rb +0 -47
  247. data/test/test_rdoc_normal_module.rb +0 -42
  248. data/test/test_rdoc_options.rb +0 -766
  249. data/test/test_rdoc_parser.rb +0 -327
  250. data/test/test_rdoc_parser_c.rb +0 -1896
  251. data/test/test_rdoc_parser_changelog.rb +0 -315
  252. data/test/test_rdoc_parser_markdown.rb +0 -61
  253. data/test/test_rdoc_parser_rd.rb +0 -55
  254. data/test/test_rdoc_parser_ruby.rb +0 -3322
  255. data/test/test_rdoc_parser_simple.rb +0 -115
  256. data/test/test_rdoc_rd.rb +0 -30
  257. data/test/test_rdoc_rd_block_parser.rb +0 -535
  258. data/test/test_rdoc_rd_inline.rb +0 -63
  259. data/test/test_rdoc_rd_inline_parser.rb +0 -177
  260. data/test/test_rdoc_rdoc.rb +0 -455
  261. data/test/test_rdoc_require.rb +0 -25
  262. data/test/test_rdoc_ri_driver.rb +0 -1436
  263. data/test/test_rdoc_ri_paths.rb +0 -155
  264. data/test/test_rdoc_ruby_lex.rb +0 -421
  265. data/test/test_rdoc_ruby_token.rb +0 -19
  266. data/test/test_rdoc_rubygems_hook.rb +0 -251
  267. data/test/test_rdoc_servlet.rb +0 -534
  268. data/test/test_rdoc_single_class.rb +0 -20
  269. data/test/test_rdoc_stats.rb +0 -722
  270. data/test/test_rdoc_store.rb +0 -993
  271. data/test/test_rdoc_task.rb +0 -173
  272. data/test/test_rdoc_text.rb +0 -557
  273. data/test/test_rdoc_token_stream.rb +0 -42
  274. data/test/test_rdoc_tom_doc.rb +0 -520
  275. data/test/test_rdoc_top_level.rb +0 -287
  276. data/test/xref_data.rb +0 -76
  277. data/test/xref_test_case.rb +0 -67
@@ -1,306 +0,0 @@
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>