1--- 2author: 3- John MacFarlane 4- Anonymous 5date: July 17, 2006 6title: Pandoc Test Suite 7--- 8 9This is a set of tests for pandoc. Most of them are adapted from John Gruber's 10markdown test suite. 11 12------------------------------------------------------------------------------ 13 14# Headers 15 16## Level 2 with an [embedded link](/url) 17 18### Level 3 with *emphasis* 19 20#### Level 4 21 22##### Level 5 23 24# Level 1 25 26## Level 2 with *emphasis* 27 28### Level 3 29 30with no blank line 31 32## Level 2 33 34with no blank line 35 36------------------------------------------------------------------------------ 37 38# Paragraphs 39 40Here's a regular paragraph. 41 42In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. 43Because a hard-wrapped line in the middle of a paragraph looked like a list 44item. 45 46Here's one with a bullet. \* criminey. 47 48There should be a hard line break\ 49here. 50 51------------------------------------------------------------------------------ 52 53# Block Quotes 54 55E-mail style: 56 57> This is a block quote. It is pretty short. 58 59> Code in a block quote: 60> 61> sub status { 62> print "working"; 63> } 64> 65> A list: 66> 67> 1. item one 68> 2. item two 69> 70> Nested block quotes: 71> 72> > nested 73> 74> > nested 75 76This should not be a block quote: 2 \> 1. 77 78And a following paragraph. 79 80------------------------------------------------------------------------------ 81 82# Code Blocks 83 84Code: 85 86 ---- (should be four hyphens) 87 88 sub status { 89 print "working"; 90 } 91 92 this code block is indented by one tab 93 94And: 95 96 this code block is indented by two tabs 97 98 These should not be escaped: \$ \\ \> \[ \{ 99 100------------------------------------------------------------------------------ 101 102# Lists 103 104## Unordered 105 106Asterisks tight: 107 108- asterisk 1 109- asterisk 2 110- asterisk 3 111 112Asterisks loose: 113 114- asterisk 1 115 116- asterisk 2 117 118- asterisk 3 119 120Pluses tight: 121 122- Plus 1 123- Plus 2 124- Plus 3 125 126Pluses loose: 127 128- Plus 1 129 130- Plus 2 131 132- Plus 3 133 134Minuses tight: 135 136- Minus 1 137- Minus 2 138- Minus 3 139 140Minuses loose: 141 142- Minus 1 143 144- Minus 2 145 146- Minus 3 147 148## Ordered 149 150Tight: 151 1521. First 1532. Second 1543. Third 155 156and: 157 1581. One 1592. Two 1603. Three 161 162Loose using tabs: 163 1641. First 165 1662. Second 167 1683. Third 169 170and using spaces: 171 1721. One 173 1742. Two 175 1763. Three 177 178Multiple paragraphs: 179 1801. Item 1, graf one. 181 182 Item 1. graf two. The quick brown fox jumped over the lazy dog's back. 183 1842. Item 2. 185 1863. Item 3. 187 188## Nested 189 190- Tab 191 - Tab 192 - Tab 193 194Here's another: 195 1961. First 1972. Second: 198 - Fee 199 - Fie 200 - Foe 2013. Third 202 203Same thing but with paragraphs: 204 2051. First 206 2072. Second: 208 209 - Fee 210 - Fie 211 - Foe 212 2133. Third 214 215## Tabs and spaces 216 217- this is a list item indented with tabs 218 219- this is a list item indented with spaces 220 221 - this is an example list item indented with tabs 222 223 - this is an example list item indented with spaces 224 225## Fancy list markers 226 227(2) begins with 2 228 229(3) and now 3 230 231 with a continuation 232 233 iv. sublist with roman numerals, starting with 4 234 v. more items 235 (A) a subsublist 236 (B) a subsublist 237 238Nesting: 239 240A. Upper Alpha 241 I. Upper Roman. 242 (6) Decimal start with 6 243 c) Lower alpha with paren 244 245Autonumbering: 246 2471. Autonumber. 2482. More. 249 1. Nested. 250 251Should not be a list item: 252 253M.A. 2007 254 255B. Williams 256 257------------------------------------------------------------------------------ 258 259# Definition Lists 260 261Tight using spaces: 262 263apple 264: red fruit 265 266orange 267: orange fruit 268 269banana 270: yellow fruit 271 272Tight using tabs: 273 274apple 275: red fruit 276 277orange 278: orange fruit 279 280banana 281: yellow fruit 282 283Loose: 284 285apple 286 287: red fruit 288 289orange 290 291: orange fruit 292 293banana 294 295: yellow fruit 296 297Multiple blocks with italics: 298 299*apple* 300 301: red fruit 302 303 contains seeds, crisp, pleasant to taste 304 305*orange* 306 307: orange fruit 308 309 { orange code block } 310 311 > orange block quote 312 313Multiple definitions, tight: 314 315apple 316: red fruit 317: computer 318 319orange 320: orange fruit 321: bank 322 323Multiple definitions, loose: 324 325apple 326 327: red fruit 328 329: computer 330 331orange 332 333: orange fruit 334 335: bank 336 337Blank line after term, indented marker, alternate markers: 338 339apple 340 341: red fruit 342 343: computer 344 345orange 346 347: orange fruit 348 349 1. sublist 350 2. sublist 351 352# HTML Blocks 353 354Simple block on one line: 355 356<div> 357 358foo 359 360</div> 361 362And nested without indentation: 363 364<div> 365 366<div> 367 368<div> 369 370foo 371 372</div> 373 374</div> 375 376<div> 377 378bar 379 380</div> 381 382</div> 383 384Interpreted markdown in a table: 385 386```{=html} 387<table> 388``` 389```{=html} 390<tr> 391``` 392```{=html} 393<td> 394``` 395This is *emphasized* 396```{=html} 397</td> 398``` 399```{=html} 400<td> 401``` 402And this is **strong** 403```{=html} 404</td> 405``` 406```{=html} 407</tr> 408``` 409```{=html} 410</table> 411``` 412```{=html} 413<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script> 414``` 415Here's a simple block: 416 417<div> 418 419foo 420 421</div> 422 423This should be a code block, though: 424 425 <div> 426 foo 427 </div> 428 429As should this: 430 431 <div>foo</div> 432 433Now, nested: 434 435<div> 436 437<div> 438 439<div> 440 441foo 442 443</div> 444 445</div> 446 447</div> 448 449This should just be an HTML comment: 450 451```{=html} 452<!-- Comment --> 453``` 454Multiline: 455 456```{=html} 457<!-- 458Blah 459Blah 460--> 461``` 462```{=html} 463<!-- 464 This is another comment. 465--> 466``` 467Code block: 468 469 <!-- Comment --> 470 471Just plain comment, with trailing spaces on the line: 472 473```{=html} 474<!-- foo --> 475``` 476Code: 477 478 <hr /> 479 480Hr's: 481 482```{=html} 483<hr> 484``` 485```{=html} 486<hr /> 487``` 488```{=html} 489<hr /> 490``` 491```{=html} 492<hr> 493``` 494```{=html} 495<hr /> 496``` 497```{=html} 498<hr /> 499``` 500```{=html} 501<hr class="foo" id="bar" /> 502``` 503```{=html} 504<hr class="foo" id="bar" /> 505``` 506```{=html} 507<hr class="foo" id="bar"> 508``` 509 510------------------------------------------------------------------------------ 511 512# Inline Markup 513 514This is *emphasized*, and so *is this*. 515 516This is **strong**, and so **is this**. 517 518An *[emphasized link](/url)*. 519 520***This is strong and em.*** 521 522So is ***this*** word. 523 524***This is strong and em.*** 525 526So is ***this*** word. 527 528This is code: `>`, `$`, `\`, `\$`, `<html>`. 529 530~~This is *strikeout*.~~ 531 532Superscripts: a^bc^d a^*hello*^ a^hello there^. 533 534Subscripts: H~2~O, H~23~O, H~many of them~O. 535 536These should not be superscripts or subscripts, because of the unescaped 537spaces: a\^b c\^d, a\~b c\~d. 538 539------------------------------------------------------------------------------ 540 541# Smart quotes, ellipses, dashes 542 543"Hello," said the spider. "'Shelob' is my name." 544 545'A', 'B', and 'C' are letters. 546 547'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.' 548 549'He said, "I want to go."' Were you alive in the 70's? 550 551Here is some quoted '`code`' and a "[quoted 552link](http://example.com/?foo=1&bar=2)". 553 554Some dashes: one---two --- three---four --- five. 555 556Dashes between numbers: 5--7, 255--66, 1987--1999. 557 558Ellipses...and...and.... 559 560------------------------------------------------------------------------------ 561 562# LaTeX 563 564- `\cite[22-23]{smith.1899}`{=tex} 565- $2+2=4$ 566- $x \in y$ 567- $\alpha \wedge \omega$ 568- $223$ 569- $p$-Tree 570- Here's some display math: 571 $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ 572- Here's one that has a line break in it: $\alpha + \omega \times x^2$. 573 574These shouldn't be math: 575 576- To get the famous equation, write `$e = mc^2$`. 577- \$22,000 is a *lot* of money. So is \$34,000. (It worked if "lot" is 578 emphasized.) 579- Shoes (\$20) and socks (\$5). 580- Escaped `$`: \$73 *this should be emphasized* 23\$. 581 582Here's a LaTeX table: 583 584```{=tex} 585\begin{tabular}{|l|l|}\hline 586Animal & Number \\ \hline 587Dog & 2 \\ 588Cat & 1 \\ \hline 589\end{tabular} 590``` 591 592------------------------------------------------------------------------------ 593 594# Special Characters 595 596Here is some unicode: 597 598- I hat: Î 599- o umlaut: ö 600- section: § 601- set membership: ∈ 602- copyright: © 603 604AT&T has an ampersand in their name. 605 606AT&T is another way to write it. 607 608This & that. 609 6104 \< 5. 611 6126 \> 5. 613 614Backslash: \\ 615 616Backtick: \` 617 618Asterisk: \* 619 620Underscore: \_ 621 622Left brace: { 623 624Right brace: } 625 626Left bracket: \[ 627 628Right bracket: \] 629 630Left paren: ( 631 632Right paren: ) 633 634Greater-than: \> 635 636Hash: \# 637 638Period: . 639 640Bang: ! 641 642Plus: + 643 644Minus: - 645 646------------------------------------------------------------------------------ 647 648# Links 649 650## Explicit 651 652Just a [URL](/url/). 653 654[URL and title](/url/ "title"). 655 656[URL and title](/url/ "title preceded by two spaces"). 657 658[URL and title](/url/ "title preceded by a tab"). 659 660[URL and title](/url/ "title with "quotes" in it") 661 662[URL and title](/url/ "title with single quotes") 663 664[with_underscore](/url/with_underscore) 665 666[Email link](mailto:nobody@nowhere.net) 667 668[Empty](). 669 670## Reference 671 672Foo [bar](/url/). 673 674With [embedded \[brackets\]](/url/). 675 676[b](/url/) by itself should be a link. 677 678Indented [once](/url). 679 680Indented [twice](/url). 681 682Indented [thrice](/url). 683 684This should \[not\]\[\] be a link. 685 686 [not]: /url 687 688Foo [bar](/url/ "Title with "quotes" inside"). 689 690Foo [biz](/url/ "Title with "quote" inside"). 691 692## With ampersands 693 694Here's a [link with an ampersand in the URL](http://example.com/?foo=1&bar=2). 695 696Here's a link with an amersand in the link text: 697[AT&T](http://att.com/ "AT&T"). 698 699Here's an [inline link](/script?foo=1&bar=2). 700 701Here's an [inline link in pointy braces](/script?foo=1&bar=2). 702 703## Autolinks 704 705With an ampersand: <http://example.com/?foo=1&bar=2> 706 707- In a list? 708- <http://example.com/> 709- It should. 710 711An e-mail address: <nobody@nowhere.net> 712 713> Blockquoted: <http://example.com/> 714 715Auto-links should not occur here: `<http://example.com/>` 716 717 or here: <http://example.com/> 718 719------------------------------------------------------------------------------ 720 721# Images 722 723From "Voyage dans la Lune" by Georges Melies (1902): 724 725![lalune](lalune.jpg "Voyage dans la Lune") 726 727Here is a movie ![movie](movie.jpg) icon. 728 729------------------------------------------------------------------------------ 730 731# Footnotes 732 733Here is a footnote reference,[^1] and another.[^2] This should *not* be a 734footnote reference, because it contains a space.\[\^my note\] Here is an 735inline note.[^3] 736 737> Notes can go in quotes.[^4] 738 7391. And in list items.[^5] 740 741This paragraph should not be part of the note, as it is not indented. 742 743[^1]: Here is the footnote. It can go anywhere after the footnote reference. 744 It need not be placed at the end of the document. 745 746[^2]: Here's the long note. This one contains multiple blocks. 747 748 Subsequent blocks are indented to show that they belong to the footnote 749 (as with list items). 750 751 { <code> } 752 753 If you want, you can indent every line, but you can also be lazy and just 754 indent the first line of each block. 755 756[^3]: This is *easier* to type. Inline notes may contain 757 [links](http://google.com) and `]` verbatim characters, as well as 758 \[bracketed text\]. 759 760[^4]: In quote. 761 762[^5]: In list. 763