tartan 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README +130 -0
  3. data/TODO +17 -0
  4. data/lib/core_ext/array.rb +12 -0
  5. data/lib/core_ext/file.rb +15 -0
  6. data/lib/core_ext/hash.rb +16 -0
  7. data/lib/core_ext/match_data.rb +62 -0
  8. data/lib/core_ext/module.rb +17 -0
  9. data/lib/core_ext/regexp.rb +33 -0
  10. data/lib/markdown.yml +499 -0
  11. data/lib/symbolize.rb +78 -0
  12. data/lib/table.yml +63 -0
  13. data/lib/tartan.rb +359 -0
  14. data/lib/tartan_markdown.rb +8 -0
  15. data/lib/tartan_markdown_def.rb +7 -0
  16. data/lib/tartan_table_def.rb +7 -0
  17. data/lib/tartan_test_base_def.rb +5 -0
  18. data/lib/tartan_wikilink_def.rb +14 -0
  19. data/lib/test_base.yml +18 -0
  20. data/lib/wiki-test.rb +94 -0
  21. data/lib/wiki_rule.rb +240 -0
  22. data/lib/wikilink.yml +18 -0
  23. data/test/MarkdownTest_1.0/Amps and angle encoding.html +17 -0
  24. data/test/MarkdownTest_1.0/Amps and angle encoding.text +21 -0
  25. data/test/MarkdownTest_1.0/Auto links.html +18 -0
  26. data/test/MarkdownTest_1.0/Auto links.text +13 -0
  27. data/test/MarkdownTest_1.0/Backslash codeescapes.html +68 -0
  28. data/test/MarkdownTest_1.0/Backslash codeescapes.text +68 -0
  29. data/test/MarkdownTest_1.0/Backslash simpleescapes.html +33 -0
  30. data/test/MarkdownTest_1.0/Backslash simpleescapes.text +33 -0
  31. data/test/MarkdownTest_1.0/Blockquotes with code blocks.html +15 -0
  32. data/test/MarkdownTest_1.0/Blockquotes with code blocks.text +11 -0
  33. data/test/MarkdownTest_1.0/Hard-wrapped paragraphs with list-like lines.html +8 -0
  34. data/test/MarkdownTest_1.0/Hard-wrapped paragraphs with list-like lines.text +8 -0
  35. data/test/MarkdownTest_1.0/Horizontal rules.html +71 -0
  36. data/test/MarkdownTest_1.0/Horizontal rules.text +67 -0
  37. data/test/MarkdownTest_1.0/Inline HTML (Advanced).html +14 -0
  38. data/test/MarkdownTest_1.0/Inline HTML (Advanced).text +14 -0
  39. data/test/MarkdownTest_1.0/Inline HTML (Simple).html +72 -0
  40. data/test/MarkdownTest_1.0/Inline HTML (Simple).text +69 -0
  41. data/test/MarkdownTest_1.0/Inline HTML comments.html +13 -0
  42. data/test/MarkdownTest_1.0/Inline HTML comments.text +13 -0
  43. data/test/MarkdownTest_1.0/Links, inline style.html +9 -0
  44. data/test/MarkdownTest_1.0/Links, inline style.text +9 -0
  45. data/test/MarkdownTest_1.0/Links, reference style.html +18 -0
  46. data/test/MarkdownTest_1.0/Links, reference style.text +31 -0
  47. data/test/MarkdownTest_1.0/Literal quotes in titles.html +3 -0
  48. data/test/MarkdownTest_1.0/Literal quotes in titles.text +7 -0
  49. data/test/MarkdownTest_1.0/Markdown Documentation - Basics.html +314 -0
  50. data/test/MarkdownTest_1.0/Markdown Documentation - Basics.text +306 -0
  51. data/test/MarkdownTest_1.0/Markdown Documentation - Syntax.html +942 -0
  52. data/test/MarkdownTest_1.0/Markdown Documentation - Syntax.text +888 -0
  53. data/test/MarkdownTest_1.0/Nested blockquotes.html +9 -0
  54. data/test/MarkdownTest_1.0/Nested blockquotes.text +5 -0
  55. data/test/MarkdownTest_1.0/Ordered and unordered lists.html +137 -0
  56. data/test/MarkdownTest_1.0/Ordered and unordered lists.text +122 -0
  57. data/test/MarkdownTest_1.0/Strong and em together.html +7 -0
  58. data/test/MarkdownTest_1.0/Strong and em together.text +7 -0
  59. data/test/MarkdownTest_1.0/Tabs.html +25 -0
  60. data/test/MarkdownTest_1.0/Tabs.text +21 -0
  61. data/test/MarkdownTest_1.0/Tidyness.html +8 -0
  62. data/test/MarkdownTest_1.0/Tidyness.text +5 -0
  63. data/test/MarkdownTest_1.0/run-markdown.rb +56 -0
  64. data/test/MarkdownTest_1.0/test-fireball-markdown.rb +177 -0
  65. data/test/MarkdownTest_1.0/testdiff.rb +42 -0
  66. data/test/harder/test-markdown-harder.rb +11 -0
  67. data/test/harder/test-markdown-harder.yml +111 -0
  68. data/test/redcloth/redcloth-markdown-tests.rb +29 -0
  69. data/test/redcloth/redcloth-markdown-tests.yml +218 -0
  70. data/test/test-combo.rb +23 -0
  71. data/test/test-hash.rb +31 -0
  72. data/test/test-markdown.rb +11 -0
  73. data/test/test-markdown.yml +1144 -0
  74. data/test/test-match-data.rb +54 -0
  75. data/test/test-readme-example.rb +48 -0
  76. data/test/test-tables.rb +16 -0
  77. data/test/test-tables.yml +82 -0
  78. data/test/test-tartan-markdown.rb +11 -0
  79. data/test/test-tartan.rb +306 -0
  80. data/test/test-wikilink.rb +18 -0
  81. data/test/test-wikilink.yml +22 -0
  82. data/test/wikilink-test-helper.rb +14 -0
  83. metadata +139 -0
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ #$Id: test-markdown.rb 148 2006-07-22 14:04:20Z larry $
3
+
4
+ $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
5
+
6
+ #require 'tartan'
7
+ require 'tartan_markdown'
8
+ require 'wiki-test'
9
+
10
+ cases = WikiTestCases.new(TartanMarkdown, "test-markdown.yml")
11
+
@@ -0,0 +1,1144 @@
1
+ #$Id: test-markdown.yml 167 2006-08-15 06:15:47Z david $
2
+ ---
3
+ title: OneParagraph
4
+ in: "abc\ndef\nxyz"
5
+ html: "<p>abc\ndef\nxyz</p>"
6
+ ---
7
+ title: TwoParagraphs
8
+ in: "abc\ndef\n\npdq\nxyz"
9
+ html: "<p>abc\ndef</p>\n\n<p>pdq\nxyz</p>"
10
+ ---
11
+ title: ParagraphWLineBreak
12
+ in: "abc\ndef \npdq\nxyz"
13
+ html: "<p>abc\ndef<br />\npdq\nxyz</p>"
14
+ ---
15
+ title: UnlineHeader1
16
+ in: "A Header 1\n=========="
17
+ html: "<h1>A Header 1</h1>"
18
+ ---
19
+ title: UnlineHeader2
20
+ in: "A Header 1\n----------"
21
+ html: "<h2>A Header 1</h2>"
22
+ ---
23
+ title: SplatHeader6
24
+ in: "######A Header 6"
25
+ html: "<h6>A Header 6</h6>"
26
+ ---
27
+ title: SplatHeader5
28
+ in: "#####A Header 5"
29
+ html: "<h5>A Header 5</h5>"
30
+ ---
31
+ title: SplatHeader4
32
+ in: "####A Header 4"
33
+ html: "<h4>A Header 4</h4>"
34
+ ---
35
+ title: SplatHeader3
36
+ in: "###A Header 3"
37
+ html: "<h3>A Header 3</h3>"
38
+ ---
39
+ title: SplatHeader2
40
+ in: "##A Header 2"
41
+ html: "<h2>A Header 2</h2>"
42
+ ---
43
+ title: SplatHeader1
44
+ in: "#A Header 1"
45
+ html: "<h1>A Header 1</h1>"
46
+ ---
47
+ title: HeaderWithList
48
+ in: |-
49
+ #A Header 1
50
+
51
+ * item1
52
+ * item2
53
+ html: |-
54
+ <h1>A Header 1</h1>
55
+ <ul>
56
+ <li>item1</li>
57
+ <li>item2</li>
58
+ </ul>
59
+ ---
60
+ title: SplatHeader6WClose
61
+ in: "###### A Header 6 ######"
62
+ html: "<h6>A Header 6</h6>"
63
+ ---
64
+ title: SplatHeader5WClose
65
+ in: "##### A Header 5 ####"
66
+ html: "<h5>A Header 5</h5>"
67
+ ---
68
+ title: SplatHeader4WClose
69
+ in: "#### A Header 4 ####"
70
+ html: "<h4>A Header 4</h4>"
71
+ ---
72
+ title: SplatHeader3WClose
73
+ in: "### A Header 3 ###"
74
+ html: "<h3>A Header 3</h3>"
75
+ ---
76
+ title: SplatHeader2WClose
77
+ in: "## A Header 2 ##"
78
+ html: "<h2>A Header 2</h2>"
79
+ ---
80
+ title: SplatHeader1WClose
81
+ in: "# A Header 1 #"
82
+ html: "<h1>A Header 1</h1>"
83
+ ---
84
+ title: BlockQuote
85
+ in: |
86
+ > This is the first level of quoting.
87
+ > > This is nested blockquote.
88
+ >
89
+ > Back to the first level.
90
+ html: |+
91
+ <blockquote>
92
+ <p>This is the first level of quoting.</p>
93
+ <blockquote>
94
+ This is nested blockquote.
95
+ </blockquote>
96
+
97
+ <p>Back to the first level.</p>
98
+ </blockquote>
99
+ ---
100
+ title: BlockQuoteTwo
101
+ in: |
102
+ > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
103
+ > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
104
+ > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
105
+ >
106
+ > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
107
+ > id sem consectetuer libero luctus adipiscing.
108
+ html: |+
109
+ <blockquote>
110
+ <p>This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
111
+ consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
112
+ Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.</p>
113
+
114
+ <p>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
115
+ id sem consectetuer libero luctus adipiscing.</p>
116
+ </blockquote>
117
+ ---
118
+ title: BlockQuoteBeginningOnly
119
+ in: |
120
+ > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
121
+ consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
122
+ Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
123
+ >
124
+ > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
125
+ id sem consectetuer libero luctus adipiscing.
126
+ html: |+
127
+ <blockquote>
128
+ <p>This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
129
+ consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
130
+ Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.</p>
131
+
132
+ <p>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
133
+ id sem consectetuer libero luctus adipiscing.</p>
134
+ </blockquote>
135
+ ---
136
+ title: BulletListWStar
137
+ in: |-
138
+ * A
139
+ * B
140
+ html: |-
141
+ <ul>
142
+ <li>A</li>
143
+ <li>B</li>
144
+ </ul>
145
+ ---
146
+ title: BulletListWDash
147
+ in: |-
148
+ - A
149
+ - B
150
+ html: |-
151
+ <ul>
152
+ <li>A</li>
153
+ <li>B</li>
154
+ </ul>
155
+ ---
156
+ title: BulletListWPlus
157
+ in: |-
158
+ + A
159
+ + B
160
+ html: |-
161
+ <ul>
162
+ <li>A</li>
163
+ <li>B</li>
164
+ </ul>
165
+ ---
166
+ title: BulletListWBlankLineAfter
167
+ in: |-
168
+ * A
169
+ * B
170
+ * C
171
+
172
+ html: |-
173
+ <ul>
174
+ <li>A</li>
175
+ <li>B</li>
176
+ <li>C</li>
177
+ </ul>
178
+ ---
179
+ title: BulletListHanging
180
+ in: |-
181
+ + A
182
+ pdq
183
+ + B
184
+ xyz
185
+ html: |-
186
+ <ul>
187
+ <li>A
188
+ pdq</li>
189
+ <li>B
190
+ xyz</li>
191
+ </ul>
192
+ ---
193
+ title: BulletListNoHangBreak
194
+ in: |-
195
+ + A
196
+ pdq
197
+ + B
198
+ xyz
199
+ html: |-
200
+ <ul>
201
+ <li>A
202
+ pdq</li>
203
+ <li>B
204
+ xyz</li>
205
+ </ul>
206
+ ---
207
+ title: BulletListW3
208
+ in: |-
209
+ * A
210
+ * B
211
+ * C
212
+ html: |-
213
+ <ul>
214
+ <li>A</li>
215
+ <li>B</li>
216
+ <li>C</li>
217
+ </ul>
218
+ ---
219
+ title: BulletListSpaces
220
+ in: |+
221
+ * A
222
+
223
+ * B
224
+
225
+ * C
226
+ html: |+
227
+ <ul>
228
+ <li><p>A</p></li>
229
+ <li><p>B</p></li>
230
+ <li><p>C</p></li>
231
+ </ul>
232
+ ---
233
+ title: NestedLists
234
+ notin: "* Tab1\n\t* Tab2\n\t\t* Tab3"
235
+ html: |+
236
+ <ul>
237
+ <li>Tab1
238
+ <ul>
239
+ <li>Tab2
240
+ <ul>
241
+ <li>Tab3</li>
242
+ </ul></li>
243
+ </ul></li>
244
+ </ul>
245
+ ---
246
+ title: HR
247
+ in: |
248
+ * * *
249
+
250
+ ***
251
+
252
+ *****
253
+
254
+ - - -
255
+
256
+ ---------------------------------------
257
+
258
+ _ _ _
259
+ html: |+
260
+ <hr />
261
+
262
+ <hr />
263
+
264
+ <hr />
265
+
266
+ <hr />
267
+
268
+ <hr />
269
+
270
+ <hr />
271
+ ---
272
+ title: LinkInlineNoTitle
273
+ in: See my [About](/about/) page for details.
274
+ html: <p>See my <a href="/about/">About</a> page for details.</p>
275
+ ---
276
+ title: LinkInlineTitle
277
+ in: |
278
+ This is [an example](http://example.com/ "Title") inline link with a title.
279
+
280
+ [This link](http://example.net/) has no title attribute.
281
+ html: |+
282
+ <p>This is <a href="http://example.com/" title="Title">an example</a> inline link with a title.</p>
283
+
284
+ <p><a href="http://example.net/">This link</a> has no title attribute.</p>
285
+ ---
286
+ title: HTMLComments
287
+ in: |
288
+ Paragraph one.
289
+
290
+ <!-- This is a simple comment -->
291
+
292
+ <!--
293
+ This is another comment.
294
+ -->
295
+
296
+ Paragraph two.
297
+
298
+ <!-- one comment block -- -- with two comments -->
299
+
300
+ The end.
301
+ html: |+
302
+ <p>Paragraph one.</p>
303
+
304
+ <!-- This is a simple comment -->
305
+
306
+ <!--
307
+ This is another comment.
308
+ -->
309
+
310
+ <p>Paragraph two.</p>
311
+
312
+ <!-- one comment block -- -- with two comments -->
313
+
314
+ <p>The end.</p>
315
+ ---
316
+ title: CodeSpan
317
+ in: Use the `printf()` function.
318
+ html: <p>Use the <code>printf()</code> function.</p>
319
+ ---
320
+ title: BackslashEscapes
321
+ in: |
322
+ These should all get escaped (note trailing spaces):
323
+ Backslash: \\
324
+ Backtick: \`
325
+ Asterisk: \*
326
+ Underscore: \_
327
+ Left brace: \{
328
+ Right brace: \}
329
+ Left bracket: \[
330
+ Right bracket: \]
331
+ Left paren: \(
332
+ Right paren: \)
333
+ Greater-than: \>
334
+ Hash: \#
335
+ Period: \.
336
+ Bang: \!
337
+ Plus: \+
338
+ Minus: \-
339
+ html: |+
340
+ <p>These should all get escaped (note trailing spaces):<br />
341
+ Backslash: \<br />
342
+ Backtick: `<br />
343
+ Asterisk: *<br />
344
+ Underscore: _<br />
345
+ Left brace: {<br />
346
+ Right brace: }<br />
347
+ Left bracket: [<br />
348
+ Right bracket: ]<br />
349
+ Left paren: (<br />
350
+ Right paren: )<br />
351
+ Greater-than: &gt;<br />
352
+ Hash: #<br />
353
+ Period: .<br />
354
+ Bang: !<br />
355
+ Plus: +<br />
356
+ Minus: -<br /></p>
357
+ ---
358
+ title: BacktickCodeSpans
359
+ in: |
360
+ Not escaped in code spans:
361
+ Backslash: `\\`
362
+ Backtick: `` \` ``
363
+ Asterisk: `\*`
364
+ Underscore: `\_`
365
+ Left brace: `\{`
366
+ Right brace: `\}`
367
+ Left bracket: `\[`
368
+ Right bracket: `\]`
369
+ Left paren: `\(`
370
+ Right paren: `\)`
371
+ Greater-than: `\>`
372
+ Less-than: `\<`
373
+ Hash: `\#`
374
+ Period: `\.`
375
+ Bang: `\!`
376
+ Plus: `\+`
377
+ Minus: `\-`
378
+ html: |+
379
+ <p>Not escaped in code spans:<br />
380
+ Backslash: <code>\\</code><br />
381
+ Backtick: <code>\`</code><br />
382
+ Asterisk: <code>\*</code><br />
383
+ Underscore: <code>\_</code><br />
384
+ Left brace: <code>\{</code><br />
385
+ Right brace: <code>\}</code><br />
386
+ Left bracket: <code>\[</code><br />
387
+ Right bracket: <code>\]</code><br />
388
+ Left paren: <code>\(</code><br />
389
+ Right paren: <code>\)</code><br />
390
+ Greater-than: <code>\&gt;</code><br />
391
+ Less-than: <code>\&lt;</code><br />
392
+ Hash: <code>\#</code><br />
393
+ Period: <code>\.</code><br />
394
+ Bang: <code>\!</code><br />
395
+ Plus: <code>\+</code><br />
396
+ Minus: <code>\-</code><br /></p>
397
+ ---
398
+ title: ListInBlockquote
399
+ in: |
400
+ > A list within a blockquote:
401
+ >
402
+ > * asterisk 1
403
+ > * asterisk 2
404
+ > * asterisk 3
405
+ html: |+
406
+ <blockquote>
407
+ <p>A list within a blockquote:</p>
408
+
409
+ <ul>
410
+ <li>asterisk 1</li>
411
+ <li>asterisk 2</li>
412
+ <li>asterisk 3</li>
413
+ </ul>
414
+ </blockquote>
415
+ ---
416
+ title: EmInWord
417
+ in: un*fucking*believable
418
+ html: <p>un<em>fucking</em>believable</p>
419
+ ---
420
+ title: StrongStar
421
+ in: "This is **strong**"
422
+ html: "<p>This is <strong>strong</strong></p>"
423
+ ---
424
+ title: StrongUnder
425
+ in: "This is __strong__"
426
+ html: "<p>This is <strong>strong</strong></p>"
427
+ ---
428
+ title: StrongAndEm
429
+ in: |
430
+ ***This is strong and em.***
431
+
432
+ So is ***this*** word.
433
+
434
+ ___This is strong and em.___
435
+
436
+ So is ___this___ word.
437
+ html: |+
438
+ <p><strong><em>This is strong and em.</em></strong></p>
439
+
440
+ <p>So is <strong><em>this</em></strong> word.</p>
441
+
442
+ <p><strong><em>This is strong and em.</em></strong></p>
443
+
444
+ <p>So is <strong><em>this</em></strong> word.</p>
445
+ ---
446
+ title: ParagraphListLikeLines
447
+ in: |
448
+ In Markdown 1.0.0 and earlier. Version
449
+ 8. This line turns into a list item.
450
+ Because a hard-wrapped line in the
451
+ middle of a paragraph looked like a
452
+ list item.
453
+
454
+ Here's one with a bullet.
455
+ * criminey.
456
+ html: |+
457
+ <p>In Markdown 1.0.0 and earlier. Version
458
+ 8. This line turns into a list item.
459
+ Because a hard-wrapped line in the
460
+ middle of a paragraph looked like a
461
+ list item.</p>
462
+
463
+ <p>Here's one with a bullet.
464
+ * criminey.</p>
465
+ ---
466
+ title: TabsInBullets
467
+ in: |-
468
+ + this is a list item
469
+ indented with tabs
470
+
471
+ + this is a list item
472
+ indented with spaces
473
+ html: |-
474
+ <ul>
475
+ <li><p>this is a list item
476
+ indented with tabs</p></li>
477
+ <li><p>this is a list item
478
+ indented with spaces</p></li>
479
+ </ul>
480
+ ---
481
+ title: TabsInCode
482
+ in: |-
483
+ Code:
484
+
485
+ this code block is indented by one tab
486
+
487
+ And:
488
+
489
+ this code block is indented by two tabs
490
+
491
+ And:
492
+
493
+ + this is an example list item
494
+ indented with tabs
495
+
496
+ + this is an example list item
497
+ indented with spaces
498
+ html: |-
499
+ <p>Code:</p>
500
+
501
+ <pre><code>this code block is indented by one tab
502
+ </code></pre>
503
+
504
+ <p>And:</p>
505
+
506
+ <pre><code> this code block is indented by two tabs
507
+ </code></pre>
508
+
509
+ <p>And:</p>
510
+
511
+ <pre><code>+ this is an example list item
512
+ indented with tabs
513
+
514
+ + this is an example list item
515
+ indented with spaces
516
+ </code></pre>
517
+ ---
518
+ title: BulletListMultipleParagraphsTabs
519
+ in: |+
520
+ * A
521
+
522
+ But on the other hand ...
523
+
524
+ * B
525
+ html: |+
526
+ <ul>
527
+ <li><p>A</p>
528
+
529
+ <p>But on the other hand ...</p></li>
530
+ <li><p>B</p></li>
531
+ </ul>
532
+ ---
533
+ title: BulletListMultipleParagraphsSpaces
534
+ in: |-
535
+ * A
536
+
537
+ But on the other hand ...
538
+
539
+ * B
540
+ html: |-
541
+ <ul>
542
+ <li><p>A</p>
543
+
544
+ <p>But on the other hand ...</p></li>
545
+ <li><p>B</p></li>
546
+ </ul>
547
+ ---
548
+ title: HTMLTable
549
+ in: |
550
+ This is a regular paragraph.
551
+
552
+ <table>
553
+ <tr>
554
+ <td>Foo</td>
555
+ </tr>
556
+ </table>
557
+
558
+ This is another regular paragraph.
559
+ html: |+
560
+ <p>This is a regular paragraph.</p>
561
+
562
+ <table>
563
+ <tr>
564
+ <td>Foo</td>
565
+ </tr>
566
+ </table>
567
+
568
+ <p>This is another regular paragraph.</p>
569
+ ---
570
+ title: HTMLdiv
571
+ in: |
572
+ This is a regular paragraph.
573
+
574
+ <div class="foo">
575
+ test
576
+ </div>
577
+
578
+ This is another regular paragraph.
579
+ html: |+
580
+ <p>This is a regular paragraph.</p>
581
+
582
+ <div class="foo">
583
+ test
584
+ </div>
585
+
586
+ <p>This is another regular paragraph.</p>
587
+ ---
588
+ title: NumberedListsTight
589
+ in: |-
590
+ tight
591
+
592
+ 1. One
593
+ 5. Two
594
+ 9. Three
595
+ html: |-
596
+ <p>tight</p>
597
+ <ol>
598
+ <li>One</li>
599
+ <li>Two</li>
600
+ <li>Three</li>
601
+ </ol>
602
+ ---
603
+ title: NumberedListsTightWithExtraLines
604
+ in: |-
605
+ tight
606
+
607
+ 1. One
608
+ 5. Two
609
+ 9. Three
610
+
611
+ Other text.
612
+ html: |-
613
+ <p>tight</p>
614
+ <ol>
615
+ <li>One</li>
616
+ <li>Two</li>
617
+ <li>Three</li>
618
+ </ol>
619
+
620
+ <p>Other text.</p>
621
+ ---
622
+ title: NumberedListsLoose
623
+ in: |+
624
+ and loose
625
+
626
+ 1. First
627
+
628
+ 0. Second
629
+
630
+ 3. Third
631
+ html: |+
632
+ <p>and loose</p>
633
+ <ol>
634
+ <li><p>First</p></li>
635
+ <li><p>Second</p></li>
636
+ <li><p>Third</p></li>
637
+ </ol>
638
+ ---
639
+ title: MixedListsTight
640
+ in: |-
641
+ 1. First
642
+ 2. Second:
643
+ * Fee
644
+ * Fie
645
+ * Foe
646
+ 3. Third
647
+ html: |-
648
+ <ol>
649
+ <li>First</li>
650
+ <li>Second:
651
+ <ul>
652
+ <li>Fee</li>
653
+ <li>Fie</li>
654
+ <li>Foe</li>
655
+ </ul></li>
656
+ <li>Third</li>
657
+ </ol>
658
+ ---
659
+ title: RefLink
660
+ in: |-
661
+ This is [an example][id] reference-style link.
662
+
663
+ [id]: http://example.com/
664
+ html: |+
665
+ <p>This is <a href="http://example.com/">an example</a> reference-style link.</p>
666
+ ---
667
+ title: RefLinkAngles
668
+ in: |-
669
+ This is [an example][id] reference-style link.
670
+
671
+ [id]: <http://example.com/>
672
+ html: |+
673
+ <p>This is <a href="http://example.com/">an example</a> reference-style link.</p>
674
+ ---
675
+ title: RefLinkCap
676
+ in: |-
677
+ This is [an example][Id] reference-style link.
678
+
679
+ [id]: http://example.com/
680
+ html: |+
681
+ <p>This is <a href="http://example.com/">an example</a> reference-style link.</p>
682
+ ---
683
+ title: RefLinkStuff
684
+ in: |-
685
+ This is [an example][id] reference-style link.
686
+
687
+ **Stuff**
688
+
689
+ [id]: http://example.com/
690
+ html: |+
691
+ <p>This is <a href="http://example.com/">an example</a> reference-style link.</p>
692
+
693
+ <p><strong>Stuff</strong></p>
694
+ ---
695
+ title: RefLinkTitle
696
+ in: |-
697
+ This is [an example][id] reference-style link.
698
+
699
+ [id]: http://example.com/ "optional"
700
+ html: |+
701
+ <p>This is <a href="http://example.com/" title="optional">an example</a> reference-style link.</p>
702
+ ---
703
+ title: SharedRefLinks
704
+ in: |-
705
+ This is [an example][id] reference-style link.
706
+
707
+ This is [an example] [id] reference-style link.
708
+
709
+ [id]: http://example.com/ "Optional Title Here"
710
+ html: |+
711
+ <p>This is <a href="http://example.com/" title="Optional Title Here">an example</a> reference-style link.</p>
712
+
713
+ <p>This is <a href="http://example.com/" title="Optional Title Here">an example</a> reference-style link.</p>
714
+ ---
715
+ title: MultipleRefLinksTitles
716
+ in: |
717
+ I get 10 times more traffic from [Google] [1] than from
718
+ [Yahoo] [2] or [MSN] [3].
719
+
720
+ [1]: http://google.com/ "Google"
721
+ [2]: http://search.yahoo.com/ "Yahoo Search"
722
+ [3]: http://search.msn.com/ "MSN Search"
723
+
724
+ html: |+
725
+ <p>I get 10 times more traffic from <a href="http://google.com/" title="Google">Google</a> than from
726
+ <a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
727
+
728
+ ---
729
+ title: RefLinksWithFollowingText
730
+ in: |-
731
+ **Note:** This document is itself written using Markdown; you
732
+ can [see the source for it by adding '.text' to the URL][src].
733
+
734
+ [src]: /projects/markdown/syntax.text
735
+
736
+ * * *
737
+ html: |-
738
+ <p><strong>Note:</strong> This document is itself written using Markdown; you
739
+ can <a href="/projects/markdown/syntax.text">see the source for it by adding '.text' to the URL</a>.</p>
740
+
741
+
742
+ <hr />
743
+ ---
744
+ title: ImplicitRefLinksTitles
745
+ in: |
746
+ I get 10 times more traffic from [Google][] than from
747
+ [Yahoo][] or [MSN][].
748
+
749
+ [Google]: http://google.com/ "Google"
750
+ [Yahoo]: http://search.yahoo.com/ "Yahoo Search"
751
+ [MSN]: http://search.msn.com/ "MSN Search"
752
+ html: |+
753
+ <p>I get 10 times more traffic from <a href="http://google.com/" title="Google">Google</a> than from
754
+ <a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
755
+
756
+ ---
757
+ title: RefLinkTitleLine
758
+ in: |-
759
+ This is [an example][id] reference-style link.
760
+
761
+ [id]: http://example.com/
762
+ "optional"
763
+ html: |+
764
+ <p>This is <a href="http://example.com/" title="optional">an example</a> reference-style link.</p>
765
+ ---
766
+ # Tests derived from http://daringfireball.net/projects/markdown/syntax
767
+ title: HtmlBlockquote
768
+ in: <blockquote>A block quote.</blockquote>
769
+ html: <blockquote>A block quote.</blockquote>
770
+ ---
771
+ title: HtmlBlockquoteFalseBold
772
+ in: <blockquote>An **important** block quote.</blockquote>
773
+ html: <blockquote>An **important** block quote.</blockquote>
774
+ ---
775
+ title: HtmlBlockquoteDouble
776
+ in: <blockquote>A <blockquote>block</blockquote> **quote**.</blockquote>
777
+ html: <blockquote>A <blockquote>block</blockquote> **quote**.</blockquote>
778
+ ---
779
+ title: HtmlPara
780
+ in: <p>This is a paragraph. Are we having **fun** yet?</p>
781
+ html: <p>This is a paragraph. Are we having **fun** yet?</p>
782
+ ---
783
+ title: HtmlTable
784
+ in: |-
785
+ <table><tr><th>First Col</th><th>Second Col</th></tr>
786
+ <tr><td>A</td><td>B</td></tr>
787
+ </table>
788
+ html: |-
789
+ <table><tr><th>First Col</th><th>Second Col</th></tr>
790
+ <tr><td>A</td><td>B</td></tr>
791
+ </table>
792
+ ---
793
+ title: HtmlDiv
794
+ in: <div class="bob">Some *specific* text.</div>
795
+ html: <div class="bob">Some *specific* text.</div>
796
+ ---
797
+ title: HtmlPre
798
+ in: |-
799
+ <pre id="mypre">
800
+ This is my way of doing things.
801
+ And don't you change it.
802
+ </pre>
803
+ html: |-
804
+ <pre id="mypre">
805
+ This is my way of doing things.
806
+ And don't you change it.
807
+ </pre>
808
+ ---
809
+ title: HtmlCenter
810
+ in: |-
811
+ in: <center>Get this to the middle.</center>
812
+ out: <center>Get this to the middle.</center>
813
+ ---
814
+ title: HtmlDivSeparated
815
+ in: |-
816
+ <div>This is _div_ text.</div>
817
+
818
+ This is *not* div text.
819
+
820
+ <div>This is more *div* text</div>
821
+ html: |-
822
+ <div>This is _div_ text.</div>
823
+
824
+ <p>This is <em>not</em> div text.</p>
825
+
826
+ <div>This is more *div* text</div>
827
+ ---
828
+ title: HtmlSpan
829
+ in: <span id="4">This is something I want *you* to understand.</span>
830
+ html: <p><span id="4">This is something I want <em>you</em> to understand.</span></p>
831
+ ---
832
+ title: HtmlCite
833
+ in: <cite id="4">This is something I want *you* to understand.</cite>
834
+ html: <p><cite id="4">This is something I want <em>you</em> to understand.</cite></p>
835
+ ---
836
+ title: HtmlDel
837
+ in: <del id="4">This is something I want *you* to understand.</del>
838
+ html: <p><del id="4">This is something I want <em>you</em> to understand.</del></p>
839
+ ---
840
+ title: HtmlEm
841
+ in: <em id="4">This is something I want *you* to understand.</em>
842
+ html: <p><em id="4">This is something I want <em>you</em> to understand.</em></p>
843
+ ---
844
+ title: HtmlStrong
845
+ in: <strong id="4">This is something I want *you* to understand.</strong>
846
+ html: <p><strong id="4">This is something I want <em>you</em> to understand.</strong></p>
847
+ ---
848
+ title: HtmlItalic
849
+ in: <i id="4">This is something I want *you* to understand.</i>
850
+ html: <p><i id="4">This is something I want <em>you</em> to understand.</i></p>
851
+ ---
852
+ title: HtmlBold
853
+ in: <b id="4">This is something I want *you* to understand.</b>
854
+ html: <p><b id="4">This is something I want <em>you</em> to understand.</b></p>
855
+ ---
856
+ title: HtmlFont
857
+ in: <font id="4">This is something I want *you* to understand.</font>
858
+ html: <p><font id="4">This is something I want <em>you</em> to understand.</font></p>
859
+ ---
860
+ title: HtmlCode
861
+ in: <code id="4">This is something I want *you* to understand.</code>
862
+ html: <p><code id="4">This is something I want <em>you</em> to understand.</code></p>
863
+ ---
864
+ title: HtmlSample
865
+ in: <samp id="4">This is something I want *you* to understand.</samp>
866
+ html: <p><samp id="4">This is something I want <em>you</em> to understand.</samp></p>
867
+ ---
868
+ title: HtmlKbd
869
+ in: <kbd id="4">This is something I want *you* to understand.</kbd>
870
+ html: <p><kbd id="4">This is something I want <em>you</em> to understand.</kbd></p>
871
+ ---
872
+ title: HtmlVar
873
+ in: <var id="4">This is something I want *you* to understand.</var>
874
+ html: <p><var id="4">This is something I want <em>you</em> to understand.</var></p>
875
+ ---
876
+ title: HtmlAbbr
877
+ in: <abbr id="4">This is something I want *you* to understand.</abbr>
878
+ html: <p><abbr id="4">This is something I want <em>you</em> to understand.</abbr></p>
879
+ ---
880
+ title: HtmlDfn
881
+ in: <dfn id="4">This is something I want *you* to understand.</dfn>
882
+ html: <p><dfn id="4">This is something I want <em>you</em> to understand.</dfn></p>
883
+ ---
884
+ title: HtmlAcronym
885
+ in: <acronym id="4">This is something I want *you* to understand.</acronym>
886
+ html: <p><acronym id="4">This is something I want <em>you</em> to understand.</acronym></p>
887
+ ---
888
+ title: HtmlLink
889
+ in: <a href="http://www.a.org">This is something I want *you* to understand.</a>
890
+ html: <p><a href="http://www.a.org">This is something I want <em>you</em> to understand.</a></p>
891
+ ---
892
+ title: HtmlImg
893
+ in: <img src="http://www.a.org/dog.png">This is something I want *you* to understand.</img>
894
+ html: <p><img src="http://www.a.org/dog.png">This is something I want <em>you</em> to understand.</img></p>
895
+ ---
896
+ title: HtmlObject
897
+ in: <object classid="http://www.miamachina.it/analogclock.py">This is something I want *you* to understand.</object>
898
+ html: <p><object classid="http://www.miamachina.it/analogclock.py">This is something I want <em>you</em> to understand.</object></p>
899
+ ---
900
+ title: HtmlTt
901
+ in: <tt id="4">This is something I want *you* to understand.</tt>
902
+ html: <p><tt id="4">This is something I want <em>you</em> to understand.</tt></p>
903
+ ---
904
+ title: HtmlBig
905
+ in: <big id="4">This is something I want *you* to understand.</big>
906
+ html: <p><big id="4">This is something I want <em>you</em> to understand.</big></p>
907
+ ---
908
+ title: HtmlSmall
909
+ in: <small id="4">This is something I want *you* to understand.</small>
910
+ html: <p><small id="4">This is something I want <em>you</em> to understand.</small></p>
911
+ ---
912
+ title: HtmlStrike
913
+ in: <strike id="4">This is something I want *you* to understand.</strike>
914
+ html: <p><strike id="4">This is something I want <em>you</em> to understand.</strike></p>
915
+ ---
916
+ title: HtmlS
917
+ in: <s id="4">This is something I want *you* to understand.</s>
918
+ html: <p><s id="4">This is something I want <em>you</em> to understand.</s></p>
919
+ ---
920
+ title: HtmlSup
921
+ in: <sup id="4">This is something I want *you* to understand.</sup>
922
+ html: <p><sup id="4">This is something I want <em>you</em> to understand.</sup></p>
923
+ ---
924
+ title: HtmlSub
925
+ in: <sub id="4">This is something I want *you* to understand.</sub>
926
+ html: <p><sub id="4">This is something I want <em>you</em> to understand.</sub></p>
927
+ ---
928
+ title: HtmlQ
929
+ in: <q id="4">This is something I want *you* to understand.</q>
930
+ html: <p><q id="4">This is something I want <em>you</em> to understand.</q></p>
931
+ ---
932
+ title: HtmlEntities
933
+ in: Some text with &copy;.
934
+ html: <p>Some text with &copy;.</p>
935
+ ---
936
+ title: BulletListTightFollowedByParagraph
937
+ in: |-
938
+ * x
939
+ * y
940
+ * z
941
+
942
+ Now is the time for all good men to come to the aid of their country.
943
+ html: |-
944
+ <ul>
945
+ <li>x</li>
946
+ <li>y</li>
947
+ <li>z</li>
948
+ </ul>
949
+
950
+ <p>Now is the time for all good men to come to the aid of their country.</p>
951
+ ---
952
+ title: BulletListTightFollowedByShortParagraph
953
+ in: |-
954
+ * A
955
+ * B
956
+ * C
957
+
958
+ xyz
959
+ html: |-
960
+ <ul>
961
+ <li>A</li>
962
+ <li>B</li>
963
+ <li>C</li>
964
+ </ul>
965
+
966
+ <p>xyz</p>
967
+ ---
968
+ title: StripReturns
969
+ in: "This is me\r\nand that is you.\nShall we meet?"
970
+ html: "<p>This is me\nand that is you.\nShall we meet?</p>"
971
+ ---
972
+ title: BigNestedBulletList
973
+ in: |+
974
+
975
+
976
+ * Overview
977
+ * Philosophy
978
+ * Inline HTML
979
+ * Automatic Escaping for Special Characters
980
+ * Block Elements
981
+ * Paragraphs and Line Breaks
982
+ * Headers
983
+ * Blockquotes
984
+ * Lists
985
+ * Code Blocks
986
+ * Horizontal Rules
987
+ * Span Elements
988
+ * Links
989
+ * Emphasis
990
+ * Code
991
+ * Images
992
+ * Miscellaneous
993
+ * Backslash Escapes
994
+ * Automatic Links
995
+
996
+
997
+ html: |+
998
+
999
+
1000
+ <ul>
1001
+ <li>Overview
1002
+ <ul>
1003
+ <li>Philosophy</li>
1004
+ <li>Inline HTML</li>
1005
+ <li>Automatic Escaping for Special Characters</li>
1006
+ </ul></li>
1007
+ <li>Block Elements
1008
+ <ul>
1009
+ <li>Paragraphs and Line Breaks</li>
1010
+ <li>Headers</li>
1011
+ <li>Blockquotes</li>
1012
+ <li>Lists</li>
1013
+ <li>Code Blocks</li>
1014
+ <li>Horizontal Rules</li>
1015
+ </ul></li>
1016
+ <li>Span Elements
1017
+ <ul>
1018
+ <li>Links</li>
1019
+ <li>Emphasis</li>
1020
+ <li>Code</li>
1021
+ <li>Images</li>
1022
+ </ul></li>
1023
+ <li>Miscellaneous
1024
+ <ul>
1025
+ <li>Backslash Escapes</li>
1026
+ <li>Automatic Links</li>
1027
+ </ul></li>
1028
+ </ul>
1029
+
1030
+ ---
1031
+ title: CodeBlock
1032
+ in: |2-
1033
+ This is a regular paragraph.
1034
+
1035
+ <table>
1036
+ <tr>
1037
+ <td>Foo</td>
1038
+ </tr>
1039
+ </table>
1040
+
1041
+ This is another regular paragraph.
1042
+ html: |-
1043
+ <pre><code>This is a regular paragraph.
1044
+
1045
+ &lt;table&gt;
1046
+ &lt;tr&gt;
1047
+ &lt;td&gt;Foo&lt;/td&gt;
1048
+ &lt;/tr&gt;
1049
+ &lt;/table&gt;
1050
+
1051
+ This is another regular paragraph.
1052
+ </code></pre>
1053
+ ---
1054
+ title: CodeBlockWithEmptySecondLine
1055
+ in: |2-
1056
+
1057
+
1058
+ <http://example.com/>
1059
+
1060
+ Happy days
1061
+ html: |-
1062
+
1063
+
1064
+ <pre><code>&lt;http://example.com/&gt;
1065
+ </code></pre>
1066
+
1067
+ <p>Happy days</p>
1068
+
1069
+
1070
+ ---
1071
+ # Transfered from test-markdown-harder.yml
1072
+ title: LTGTinCode
1073
+ in: "`<h1>`"
1074
+ html: "<p><code>&lt;h1&gt;</code></p>"
1075
+ ---
1076
+ # Transfered from test-markdown-harder.yml
1077
+ title: HTMLInPre
1078
+ in: " <h1>A First Level Header</h1>"
1079
+ html: |-
1080
+ <pre><code>&lt;h1&gt;A First Level Header&lt;/h1&gt;
1081
+ </code></pre>
1082
+ ---
1083
+ title: InlineImageLinkWithTitle
1084
+ in: |-
1085
+ ![alt text](/path/to/img.jpg "Title")
1086
+ html: |-
1087
+ <p><img src="/path/to/img.jpg" alt="alt text" title="Title" /></p>
1088
+ ---
1089
+ title: InlineImageLink
1090
+ in: |-
1091
+ ![alt text](/path/to/img.jpg)
1092
+ html: |-
1093
+ <p><img src="/path/to/img.jpg" alt="alt text" /></p>
1094
+ ---
1095
+ title: ReferenceImageLinkWithTitle
1096
+ in: |-
1097
+ ![alt text][id]
1098
+
1099
+ [id]: /path/to/img.jpg "Title"
1100
+ html: |+
1101
+ <p><img src="/path/to/img.jpg" alt="alt text" title="Title" /></p>
1102
+ ---
1103
+ title: ReferenceImageLink
1104
+ in: |-
1105
+ ![alt text][id]
1106
+
1107
+ [id]: /path/to/img.jpg
1108
+ html: |+
1109
+ <p><img src="/path/to/img.jpg" alt="alt text" /></p>
1110
+ ---
1111
+ title: CRinBulletItem
1112
+ in: |-
1113
+ * jumpstarting complex projects with solid planning, project management
1114
+ and technical direction
1115
+ * retooling your technical team for agile/XP development
1116
+ html: |-
1117
+ <ul>
1118
+ <li>jumpstarting complex projects with solid planning, project management
1119
+ and technical direction</li>
1120
+ <li>retooling your technical team for agile/XP development</li>
1121
+ </ul>
1122
+ ---
1123
+ title: CodeInDiv
1124
+ in: |-
1125
+ <div>
1126
+
1127
+ code?
1128
+ </div>
1129
+ html: |-
1130
+ <div>
1131
+
1132
+ code?
1133
+ </div>
1134
+ ---
1135
+ title: SpuriousHeader
1136
+ in: |-
1137
+ bob
1138
+
1139
+
1140
+ -----
1141
+ html: |-
1142
+ <p>bob</p>
1143
+
1144
+ <hr />