git.iko.soy/typeable/pandoc
on 2.7.2 help sign in
typeable/pandoc/test/testsuite.txt
725 lines 9.2 kB history raw
1% Pandoc Test Suite
2% John MacFarlane; Anonymous
3% July 17, 2006
5This is a set of tests for pandoc. Most of them are adapted from
6John Gruber's markdown test suite.
8-----
10# Headers
12## Level 2 with an [embedded link](/url)
14### Level 3 with *emphasis*
16#### Level 4
18##### Level 5
20Level 1
21=======
23Level 2 with *emphasis*
24-----------------------
26### Level 3
27with no blank line
29Level 2
30-------
31with no blank line
33----------
35# Paragraphs
37Here's a regular paragraph.
39In Markdown 1.0.0 and earlier. Version
408. This line turns into a list item.
41Because a hard-wrapped line in the
42middle of a paragraph looked like a
43list item.
45Here's one with a bullet.
46* criminey.
48There should be a hard line break
49here.
51---
53# Block Quotes
55E-mail style:
57> This is a block quote.
58> It is pretty short.
60> Code in a block quote:
61>
62> sub status {
63> print "working";
64> }
65>
66> A list:
67>
68> 1. item one
69> 2. item two
71> Nested block quotes:
73> > nested
75>> nested
78This should not be a block quote: 2
79> 1.
81And a following paragraph.
83* * * *
85# Code Blocks
87Code:
89 ---- (should be four hyphens)
91 sub status {
92 print "working";
93 }
95 this code block is indented by one tab
97And:
99 this code block is indented by two tabs
101 These should not be escaped: \$ \\ \> \[ \{
103___________
105# Lists
107## Unordered
109Asterisks tight:
111* asterisk 1
112* asterisk 2
113* asterisk 3
115Asterisks loose:
117* asterisk 1
119* asterisk 2
121* asterisk 3
123Pluses tight:
125+ Plus 1
126+ Plus 2
127+ Plus 3
129Pluses loose:
131+ Plus 1
133+ Plus 2
135+ Plus 3
137Minuses tight:
139- Minus 1
140- Minus 2
141- Minus 3
143Minuses loose:
145- Minus 1
147- Minus 2
149- Minus 3
151## Ordered
153Tight:
1551. First
1562. Second
1573. Third
159and:
1611. One
1622. Two
1633. Three
165Loose using tabs:
1671. First
1692. Second
1713. Third
173and using spaces:
1751. One
1772. Two
1793. Three
181Multiple paragraphs:
1831. Item 1, graf one.
185 Item 1. graf two. The quick brown fox jumped over the lazy dog's
186 back.
1882. Item 2.
1903. Item 3.
192## Nested
194* Tab
195 * Tab
196 * Tab
198Here's another:
2001. First
2012. Second:
202 * Fee
203 * Fie
204 * Foe
2053. Third
207Same thing but with paragraphs:
2091. First
2112. Second:
213 * Fee
214 * Fie
215 * Foe
2173. Third
219## Tabs and spaces
221+ this is a list item
222 indented with tabs
224+ this is a list item
225 indented with spaces
227 + this is an example list item
228 indented with tabs
230 + this is an example list item
231 indented with spaces
233## Fancy list markers
235(2) begins with 2
236(3) and now 3
238 with a continuation
240 iv. sublist with roman numerals,
241 starting with 4
242 v. more items
243 (A) a subsublist
244 (B) a subsublist
246Nesting:
248A. Upper Alpha
249 I. Upper Roman.
250 (6) Decimal start with 6
251 c) Lower alpha with paren
253Autonumbering:
255 #. Autonumber.
256 #. More.
257 #. Nested.
259Should not be a list item:
261M.A. 2007
263B. Williams
265 * * * * *
267# Definition Lists
269Tight using spaces:
271apple
272: red fruit
274orange
275: orange fruit
277banana
278: yellow fruit
280Tight using tabs:
282apple
283: red fruit
285orange
286: orange fruit
288banana
289: yellow fruit
291Loose:
293apple
295: red fruit
297orange
299: orange fruit
301banana
303: yellow fruit
305Multiple blocks with italics:
307*apple*
309: red fruit
311 contains seeds,
312 crisp, pleasant to taste
314*orange*
316: orange fruit
318 { orange code block }
320 > orange block quote
322Multiple definitions, tight:
324apple
325: red fruit
326: computer
328orange
329: orange fruit
330: bank
332Multiple definitions, loose:
334apple
336: red fruit
338: computer
340orange
342: orange fruit
344: bank
346Blank line after term, indented marker, alternate markers:
348apple
350 ~ red fruit
352 ~ computer
354orange
356 ~ orange fruit
358 1. sublist
359 2. sublist
361# HTML Blocks
363Simple block on one line:
365<div>foo</div>
367And nested without indentation:
369<div>
370<div>
371<div>
372foo
373</div>
374</div>
375<div>bar</div>
376</div>
378Interpreted markdown in a table:
380<table>
381<tr>
382<td>This is *emphasized*</td>
383<td>And this is **strong**</td>
384</tr>
385</table>
387<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
389Here's a simple block:
391<div>
392foo
393</div>
395This should be a code block, though:
397 <div>
398 foo
399 </div>
401As should this:
403 <div>foo</div>
405Now, nested:
407<div>
408 <div>
409 <div>
410 foo
411 </div>
412 </div>
413</div>
415This should just be an HTML comment:
417<!-- Comment -->
419Multiline:
421<!--
422Blah
423Blah
424-->
426<!--
427 This is another comment.
428-->
430Code block:
432 <!-- Comment -->
434Just plain comment, with trailing spaces on the line:
436<!-- foo -->
438Code:
440 <hr />
442Hr's:
444<hr>
446<hr />
448<hr />
450<hr>
452<hr />
454<hr />
456<hr class="foo" id="bar" />
458<hr class="foo" id="bar" />
460<hr class="foo" id="bar">
462-----
464# Inline Markup
466This is *emphasized*, and so _is this_.
468This is **strong**, and so __is this__.
470An *[emphasized link](/url)*.
472***This is strong and em.***
474So is ***this*** word.
476___This is strong and em.___
478So is ___this___ word.
480This is code: `>`, `$`, `\`, `\$`, `<html>`.
482~~This is *strikeout*.~~
484Superscripts: a^bc^d a^*hello*^ a^hello\ there^.
486Subscripts: H~2~O, H~23~O, H~many\ of\ them~O.
488These should not be superscripts or subscripts,
489because of the unescaped spaces: a^b c^d, a~b c~d.
491-----
493# Smart quotes, ellipses, dashes
495"Hello," said the spider. "'Shelob' is my name."
497'A', 'B', and 'C' are letters.
499'Oak,' 'elm,' and 'beech' are names of trees.
500So is 'pine.'
502'He said, "I want to go."' Were you alive in the
50370's?
505Here is some quoted '`code`' and a "[quoted link][1]".
507Some dashes: one---two --- three---four --- five.
509Dashes between numbers: 5--7, 255--66, 1987--1999.
511Ellipses...and...and....
513-----
515# LaTeX
517- \cite[22-23]{smith.1899}
518- $2+2=4$
519- $x \in y$
520- $\alpha \wedge \omega$
521- $223$
522- $p$-Tree
523- Here's some display math:
524 $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
525- Here's one that has a line break in it: $\alpha + \omega \times
526x^2$.
528These shouldn't be math:
530- To get the famous equation, write `$e = mc^2$`.
531- $22,000 is a *lot* of money. So is $34,000.
532 (It worked if "lot" is emphasized.)
533- Shoes ($20) and socks ($5).
534- Escaped `$`: $73 *this should be emphasized* 23\$.
536Here's a LaTeX table:
538\begin{tabular}{|l|l|}\hline
539Animal & Number \\ \hline
540Dog & 2 \\
541Cat & 1 \\ \hline
542\end{tabular}
544* * * * *
546# Special Characters
548Here is some unicode:
550- I hat: Î
551- o umlaut: ö
552- section: §
553- set membership: ∈
554- copyright: ©
556AT&T has an ampersand in their name.
558AT&amp;T is another way to write it.
560This & that.
5624 < 5.
5646 > 5.
566Backslash: \\
568Backtick: \`
570Asterisk: \*
572Underscore: \_
574Left brace: \{
576Right brace: \}
578Left bracket: \[
580Right bracket: \]
582Left paren: \(
584Right paren: \)
586Greater-than: \>
588Hash: \#
590Period: \.
592Bang: \!
594Plus: \+
596Minus: \-
598- - - - - - - - - - - - -
600# Links
602## Explicit
604Just a [URL](/url/).
606[URL and title](/url/ "title").
608[URL and title](/url/ "title preceded by two spaces").
610[URL and title](/url/ "title preceded by a tab").
612[URL and title](/url/ "title with "quotes" in it")
614[URL and title](/url/ 'title with single quotes')
616[with\_underscore](/url/with_underscore)
618[Email link](mailto:nobody@nowhere.net)
620[Empty]().
622## Reference
624Foo [bar][a].
626[a]: /url/
628With [embedded [brackets]][b].
630[b] by itself should be a link.
632Indented [once][].
634Indented [twice][].
636Indented [thrice][].
638This should [not][] be a link.
640 [once]: /url
641 [twice]: /url
643 [thrice]: /url
645 [not]: /url
647[b]: /url/
649Foo [bar][].
651Foo [biz](/url/ "Title with "quote" inside").
653 [bar]: /url/ "Title with "quotes" inside"
655## With ampersands
657Here's a [link with an ampersand in the URL][1].
659Here's a link with an amersand in the link text: [AT&T][2].
661Here's an [inline link](/script?foo=1&bar=2).
663Here's an [inline link in pointy braces](</script?foo=1&bar=2>).
665[1]: http://example.com/?foo=1&bar=2
666[2]: http://att.com/ "AT&T"
668## Autolinks
670With an ampersand: <http://example.com/?foo=1&bar=2>
672* In a list?
673* <http://example.com/>
674* It should.
676An e-mail address: <nobody@nowhere.net>
678> Blockquoted: <http://example.com/>
680Auto-links should not occur here: `<http://example.com/>`
682 or here: <http://example.com/>
684----
686# Images
688From "Voyage dans la Lune" by Georges Melies (1902):
690![lalune][]
692 [lalune]: lalune.jpg "Voyage dans la Lune"
694Here is a movie ![movie](movie.jpg) icon.
696----
698# Footnotes
700Here is a footnote reference,[^1] and another.[^longnote]
701This should *not* be a footnote reference, because it
702contains a space.[^my note] Here is an inline note.^[This
703is *easier* to type. Inline notes may contain
704[links](http://google.com) and `]` verbatim characters,
705as well as [bracketed text].]
707> Notes can go in quotes.^[In quote.]
7091. And in list items.^[In list.]
711[^longnote]: Here's the long note. This one contains multiple
712blocks.
714 Subsequent blocks are indented to show that they belong to the
715footnote (as with list items).
717 { <code> }
719 If you want, you can indent every line, but you can also be
720 lazy and just indent the first line of each block.
722This paragraph should not be part of the note, as it is not indented.
724 [^1]: Here is the footnote. It can go anywhere after the footnote
725 reference. It need not be placed at the end of the document.