git.iko.soy/typeable/pandoc
on 1.9.0.3 help sign in
typeable/pandoc/tests/testsuite.txt
718 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
273orange
274: orange fruit
275banana
276: yellow fruit
278Tight using tabs:
280apple
281: red fruit
282orange
283: orange fruit
284banana
285: yellow fruit
287Loose:
289apple
290: red fruit
292orange
293: orange fruit
295banana
296: yellow fruit
298Multiple blocks with italics:
300*apple*
301: red fruit
303 contains seeds,
304 crisp, pleasant to taste
306*orange*
307: orange fruit
309 { orange code block }
311 > orange block quote
313Multiple definitions, tight:
315apple
316: red fruit
317: computer
318orange
319: orange fruit
320: bank
322Multiple definitions, loose:
324apple
325: red fruit
327: computer
329orange
330: orange fruit
332: bank
334Blank line after term, indented marker, alternate markers:
336apple
338 ~ red fruit
340 ~ computer
342orange
344 ~ orange fruit
346 1. sublist
347 2. sublist
349# HTML Blocks
351Simple block on one line:
353<div>foo</div>
355And nested without indentation:
357<div>
358<div>
359<div>
360foo
361</div>
362</div>
363<div>bar</div>
364</div>
366Interpreted markdown in a table:
368<table>
369<tr>
370<td>This is *emphasized*</td>
371<td>And this is **strong**</td>
372</tr>
373</table>
375<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
377Here's a simple block:
379<div>
380 foo
381</div>
383This should be a code block, though:
385 <div>
386 foo
387 </div>
389As should this:
391 <div>foo</div>
393Now, nested:
395<div>
396 <div>
397 <div>
398 foo
399 </div>
400 </div>
401</div>
403This should just be an HTML comment:
405<!-- Comment -->
407Multiline:
409<!--
410Blah
411Blah
412-->
414<!--
415 This is another comment.
416-->
418Code block:
420 <!-- Comment -->
422Just plain comment, with trailing spaces on the line:
424<!-- foo -->
426Code:
428 <hr />
430Hr's:
432<hr>
434<hr />
436<hr />
438<hr>
440<hr />
442<hr />
444<hr class="foo" id="bar" />
446<hr class="foo" id="bar" />
448<hr class="foo" id="bar">
450-----
452# Inline Markup
454This is *emphasized*, and so _is this_.
456This is **strong**, and so __is this__.
458An *[emphasized link](/url)*.
460***This is strong and em.***
462So is ***this*** word.
464___This is strong and em.___
466So is ___this___ word.
468This is code: `>`, `$`, `\`, `\$`, `<html>`.
470~~This is *strikeout*.~~
472Superscripts: a^bc^d a^*hello*^ a^hello\ there^.
474Subscripts: H~2~O, H~23~O, H~many\ of\ them~O.
476These should not be superscripts or subscripts,
477because of the unescaped spaces: a^b c^d, a~b c~d.
479-----
481# Smart quotes, ellipses, dashes
483"Hello," said the spider. "'Shelob' is my name."
485'A', 'B', and 'C' are letters.
487'Oak,' 'elm,' and 'beech' are names of trees.
488So is 'pine.'
490'He said, "I want to go."' Were you alive in the
49170's?
493Here is some quoted '`code`' and a "[quoted link][1]".
495Some dashes: one---two --- three---four --- five.
497Dashes between numbers: 5--7, 255--66, 1987--1999.
499Ellipses...and...and....
501-----
503# LaTeX
505- \cite[22-23]{smith.1899}
506- $2+2=4$
507- $x \in y$
508- $\alpha \wedge \omega$
509- $223$
510- $p$-Tree
511- Here's some display math:
512 $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
513- Here's one that has a line break in it: $\alpha + \omega \times
514x^2$.
516These shouldn't be math:
518- To get the famous equation, write `$e = mc^2$`.
519- $22,000 is a *lot* of money. So is $34,000.
520 (It worked if "lot" is emphasized.)
521- Shoes ($20) and socks ($5).
522- Escaped `$`: $73 *this should be emphasized* 23\$.
524Here's a LaTeX table:
526\begin{tabular}{|l|l|}\hline
527Animal & Number \\ \hline
528Dog & 2 \\
529Cat & 1 \\ \hline
530\end{tabular}
532* * * * *
534# Special Characters
536Here is some unicode:
538- I hat: Î
539- o umlaut: ö
540- section: §
541- set membership: ∈
542- copyright: ©
544AT&T has an ampersand in their name.
546AT&amp;T is another way to write it.
548This & that.
5504 < 5.
5526 > 5.
554Backslash: \\
556Backtick: \`
558Asterisk: \*
560Underscore: \_
562Left brace: \{
564Right brace: \}
566Left bracket: \[
568Right bracket: \]
570Left paren: \(
572Right paren: \)
574Greater-than: \>
576Hash: \#
578Period: \.
580Bang: \!
582Plus: \+
584Minus: \-
586- - - - - - - - - - - - -
588# Links
590## Explicit
592Just a [URL](/url/).
594[URL and title](/url/ "title").
596[URL and title](/url/ "title preceded by two spaces").
598[URL and title](/url/ "title preceded by a tab").
600[URL and title](/url/ "title with "quotes" in it")
602[URL and title](/url/ 'title with single quotes')
604[with\_underscore](/url/with_underscore)
606[Email link](mailto:nobody@nowhere.net)
608[Empty]().
610## Reference
612Foo [bar] [a].
614Foo [bar][a].
616Foo [bar]
617[a].
619[a]: /url/
621With [embedded [brackets]] [b].
623[b] by itself should be a link.
625Indented [once][].
627Indented [twice][].
629Indented [thrice][].
631This should [not][] be a link.
633 [once]: /url
634 [twice]: /url
636 [thrice]: /url
638 [not]: /url
640[b]: /url/
642Foo [bar][].
644Foo [biz](/url/ "Title with "quote" inside").
646 [bar]: /url/ "Title with "quotes" inside"
648## With ampersands
650Here's a [link with an ampersand in the URL] [1].
652Here's a link with an amersand in the link text: [AT&T] [2].
654Here's an [inline link](/script?foo=1&bar=2).
656Here's an [inline link in pointy braces](</script?foo=1&bar=2>).
658[1]: http://example.com/?foo=1&bar=2
659[2]: http://att.com/ "AT&T"
661## Autolinks
663With an ampersand: <http://example.com/?foo=1&bar=2>
665* In a list?
666* <http://example.com/>
667* It should.
669An e-mail address: <nobody@nowhere.net>
671> Blockquoted: <http://example.com/>
673Auto-links should not occur here: `<http://example.com/>`
675 or here: <http://example.com/>
677----
679# Images
681From "Voyage dans la Lune" by Georges Melies (1902):
683![lalune][]
685 [lalune]: lalune.jpg "Voyage dans la Lune"
687Here is a movie ![movie](movie.jpg) icon.
689----
691# Footnotes
693Here is a footnote reference,[^1] and another.[^longnote]
694This should *not* be a footnote reference, because it
695contains a space.[^my note] Here is an inline note.^[This
696is *easier* to type. Inline notes may contain
697[links](http://google.com) and `]` verbatim characters,
698as well as [bracketed text].]
700> Notes can go in quotes.^[In quote.]
7021. And in list items.^[In list.]
704[^longnote]: Here's the long note. This one contains multiple
705blocks.
707 Subsequent blocks are indented to show that they belong to the
708footnote (as with list items).
710 { <code> }
712 If you want, you can indent every line, but you can also be
713 lazy and just indent the first line of each block.
715This paragraph should not be part of the note, as it is not indented.
717 [^1]: Here is the footnote. It can go anywhere after the footnote
718 reference. It need not be placed at the end of the document.