git.iko.soy/typeable/pandoc
on source_date_epoch help sign in
typeable/pandoc/test/writer.markdown
762 lines 11 kB history raw
1---
2author:
3- John MacFarlane
4- Anonymous
5date: July 17, 2006
6title: Pandoc Test Suite
7---
9This is a set of tests for pandoc. Most of them are adapted from John Gruber's
10markdown test suite.
12------------------------------------------------------------------------------
14# Headers
16## Level 2 with an [embedded link](/url)
18### Level 3 with *emphasis*
20#### Level 4
22##### Level 5
24# Level 1
26## Level 2 with *emphasis*
28### Level 3
30with no blank line
32## Level 2
34with no blank line
36------------------------------------------------------------------------------
38# Paragraphs
40Here's a regular paragraph.
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.
46Here's one with a bullet. \* criminey.
48There should be a hard line break\
49here.
51------------------------------------------------------------------------------
53# Block Quotes
55E-mail style:
57> This is a block quote. It is pretty short.
59> Code in a block quote:
61> sub status {
62> print "working";
63> }
65> A list:
67> 1. item one
68> 2. item two
70> Nested block quotes:
72> > nested
74> > nested
76This should not be a block quote: 2 \> 1.
78And a following paragraph.
80------------------------------------------------------------------------------
82# Code Blocks
84Code:
86 ---- (should be four hyphens)
88 sub status {
89 print "working";
90 }
92 this code block is indented by one tab
94And:
96 this code block is indented by two tabs
98 These should not be escaped: \$ \\ \> \[ \{
100------------------------------------------------------------------------------
102# Lists
104## Unordered
106Asterisks tight:
108- asterisk 1
109- asterisk 2
110- asterisk 3
112Asterisks loose:
114- asterisk 1
116- asterisk 2
118- asterisk 3
120Pluses tight:
122- Plus 1
123- Plus 2
124- Plus 3
126Pluses loose:
128- Plus 1
130- Plus 2
132- Plus 3
134Minuses tight:
136- Minus 1
137- Minus 2
138- Minus 3
140Minuses loose:
142- Minus 1
144- Minus 2
146- Minus 3
148## Ordered
150Tight:
1521. First
1532. Second
1543. Third
156and:
1581. One
1592. Two
1603. Three
162Loose using tabs:
1641. First
1662. Second
1683. Third
170and using spaces:
1721. One
1742. Two
1763. Three
178Multiple paragraphs:
1801. Item 1, graf one.
182 Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
1842. Item 2.
1863. Item 3.
188## Nested
190- Tab
191 - Tab
192 - Tab
194Here's another:
1961. First
1972. Second:
198 - Fee
199 - Fie
200 - Foe
2013. Third
203Same thing but with paragraphs:
2051. First
2072. Second:
209 - Fee
210 - Fie
211 - Foe
2133. Third
215## Tabs and spaces
217- this is a list item indented with tabs
219- this is a list item indented with spaces
221 - this is an example list item indented with tabs
223 - this is an example list item indented with spaces
225## Fancy list markers
227(2) begins with 2
229(3) and now 3
231 with a continuation
233 iv. sublist with roman numerals, starting with 4
234 v. more items
235 (A) a subsublist
236 (B) a subsublist
238Nesting:
240A. Upper Alpha
241 I. Upper Roman.
242 (6) Decimal start with 6
243 c) Lower alpha with paren
245Autonumbering:
2471. Autonumber.
2482. More.
249 1. Nested.
251Should not be a list item:
253M.A. 2007
255B. Williams
257------------------------------------------------------------------------------
259# Definition Lists
261Tight using spaces:
263apple
264: red fruit
266orange
267: orange fruit
269banana
270: yellow fruit
272Tight using tabs:
274apple
275: red fruit
277orange
278: orange fruit
280banana
281: yellow fruit
283Loose:
285apple
287: red fruit
289orange
291: orange fruit
293banana
295: yellow fruit
297Multiple blocks with italics:
299*apple*
301: red fruit
303 contains seeds, crisp, pleasant to taste
305*orange*
307: orange fruit
309 { orange code block }
311 > orange block quote
313Multiple definitions, tight:
315apple
316: red fruit
317: computer
319orange
320: orange fruit
321: bank
323Multiple definitions, loose:
325apple
327: red fruit
329: computer
331orange
333: orange fruit
335: bank
337Blank line after term, indented marker, alternate markers:
339apple
341: red fruit
343: computer
345orange
347: orange fruit
349 1. sublist
350 2. sublist
352# HTML Blocks
354Simple block on one line:
356<div>
358foo
360</div>
362And nested without indentation:
364<div>
366<div>
368<div>
370foo
372</div>
374</div>
376<div>
378bar
380</div>
382</div>
384Interpreted markdown in a table:
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:
417<div>
419foo
421</div>
423This should be a code block, though:
425 <div>
426 foo
427 </div>
429As should this:
431 <div>foo</div>
433Now, nested:
435<div>
437<div>
439<div>
441foo
443</div>
445</div>
447</div>
449This should just be an HTML comment:
451```{=html}
452<!-- Comment -->
453```
454Multiline:
456```{=html}
457<!--
458Blah
459Blah
460-->
461```
462```{=html}
463<!--
464 This is another comment.
465-->
466```
467Code block:
469 <!-- Comment -->
471Just plain comment, with trailing spaces on the line:
473```{=html}
474<!-- foo -->
475```
476Code:
478 <hr />
480Hr's:
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```
510------------------------------------------------------------------------------
512# Inline Markup
514This is *emphasized*, and so *is this*.
516This is **strong**, and so **is this**.
518An *[emphasized link](/url)*.
520***This is strong and em.***
522So is ***this*** word.
524***This is strong and em.***
526So is ***this*** word.
528This is code: `>`, `$`, `\`, `\$`, `<html>`.
530~~This is *strikeout*.~~
532Superscripts: a^bc^d a^*hello*^ a^hello there^.
534Subscripts: H~2~O, H~23~O, H~many of them~O.
536These should not be superscripts or subscripts, because of the unescaped
537spaces: a\^b c\^d, a\~b c\~d.
539------------------------------------------------------------------------------
541# Smart quotes, ellipses, dashes
543"Hello," said the spider. "'Shelob' is my name."
545'A', 'B', and 'C' are letters.
547'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'
549'He said, "I want to go."' Were you alive in the 70's?
551Here is some quoted '`code`' and a "[quoted
552link](http://example.com/?foo=1&bar=2)".
554Some dashes: one---two --- three---four --- five.
556Dashes between numbers: 5--7, 255--66, 1987--1999.
558Ellipses...and...and....
560------------------------------------------------------------------------------
562# LaTeX
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$.
574These shouldn't be math:
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\$.
582Here's a LaTeX table:
584```{=tex}
585\begin{tabular}{|l|l|}\hline
586Animal & Number \\ \hline
587Dog & 2 \\
588Cat & 1 \\ \hline
589\end{tabular}
590```
592------------------------------------------------------------------------------
594# Special Characters
596Here is some unicode:
598- I hat: Î
599- o umlaut: ö
600- section: §
601- set membership: ∈
602- copyright: ©
604AT&T has an ampersand in their name.
606AT&T is another way to write it.
608This & that.
6104 \< 5.
6126 \> 5.
614Backslash: \\
616Backtick: \`
618Asterisk: \*
620Underscore: \_
622Left brace: {
624Right brace: }
626Left bracket: \[
628Right bracket: \]
630Left paren: (
632Right paren: )
634Greater-than: \>
636Hash: \#
638Period: .
640Bang: !
642Plus: +
644Minus: -
646------------------------------------------------------------------------------
648# Links
650## Explicit
652Just a [URL](/url/).
654[URL and title](/url/ "title").
656[URL and title](/url/ "title preceded by two spaces").
658[URL and title](/url/ "title preceded by a tab").
660[URL and title](/url/ "title with "quotes" in it")
662[URL and title](/url/ "title with single quotes")
664[with_underscore](/url/with_underscore)
666[Email link](mailto:nobody@nowhere.net)
668[Empty]().
670## Reference
672Foo [bar](/url/).
674With [embedded \[brackets\]](/url/).
676[b](/url/) by itself should be a link.
678Indented [once](/url).
680Indented [twice](/url).
682Indented [thrice](/url).
684This should \[not\]\[\] be a link.
686 [not]: /url
688Foo [bar](/url/ "Title with "quotes" inside").
690Foo [biz](/url/ "Title with "quote" inside").
692## With ampersands
694Here's a [link with an ampersand in the URL](http://example.com/?foo=1&bar=2).
696Here's a link with an amersand in the link text:
697[AT&T](http://att.com/ "AT&T").
699Here's an [inline link](/script?foo=1&bar=2).
701Here's an [inline link in pointy braces](/script?foo=1&bar=2).
703## Autolinks
705With an ampersand: <http://example.com/?foo=1&bar=2>
707- In a list?
708- <http://example.com/>
709- It should.
711An e-mail address: <nobody@nowhere.net>
713> Blockquoted: <http://example.com/>
715Auto-links should not occur here: `<http://example.com/>`
717 or here: <http://example.com/>
719------------------------------------------------------------------------------
721# Images
723From "Voyage dans la Lune" by Georges Melies (1902):
725![lalune](lalune.jpg "Voyage dans la Lune")
727Here is a movie ![movie](movie.jpg) icon.
729------------------------------------------------------------------------------
731# Footnotes
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]
737> Notes can go in quotes.[^4]
7391. And in list items.[^5]
741This paragraph should not be part of the note, as it is not indented.
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.
746[^2]: Here's the long note. This one contains multiple blocks.
748 Subsequent blocks are indented to show that they belong to the footnote
749 (as with list items).
751 { <code> }
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.
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\].
760[^4]: In quote.
762[^5]: In list.