git.iko.soy/typeable/pandoc
on 2.5 help sign in
typeable/pandoc/test/writer.markdown
746 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------------------------------------------------------------------------------
14Headers
15=======
17Level 2 with an [embedded link](/url)
18-------------------------------------
20### Level 3 with *emphasis*
22#### Level 4
24##### Level 5
26Level 1
27=======
29Level 2 with *emphasis*
30-----------------------
32### Level 3
34with no blank line
36Level 2
37-------
39with no blank line
41------------------------------------------------------------------------------
43Paragraphs
44==========
46Here's a regular paragraph.
48In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
49Because a hard-wrapped line in the middle of a paragraph looked like a list
50item.
52Here's one with a bullet. \* criminey.
54There should be a hard line break\
55here.
57------------------------------------------------------------------------------
59Block Quotes
60============
62E-mail style:
64> This is a block quote. It is pretty short.
66> Code in a block quote:
68> sub status {
69> print "working";
70> }
72> A list:
74> 1. item one
75> 2. item two
77> Nested block quotes:
79> > nested
81> > nested
83This should not be a block quote: 2 \> 1.
85And a following paragraph.
87------------------------------------------------------------------------------
89Code Blocks
90===========
92Code:
94 ---- (should be four hyphens)
96 sub status {
97 print "working";
98 }
100 this code block is indented by one tab
102And:
104 this code block is indented by two tabs
106 These should not be escaped: \$ \\ \> \[ \{
108------------------------------------------------------------------------------
110Lists
111=====
113Unordered
114---------
116Asterisks tight:
118- asterisk 1
119- asterisk 2
120- asterisk 3
122Asterisks loose:
124- asterisk 1
126- asterisk 2
128- asterisk 3
130Pluses tight:
132- Plus 1
133- Plus 2
134- Plus 3
136Pluses loose:
138- Plus 1
140- Plus 2
142- Plus 3
144Minuses tight:
146- Minus 1
147- Minus 2
148- Minus 3
150Minuses loose:
152- Minus 1
154- Minus 2
156- Minus 3
158Ordered
159-------
161Tight:
1631. First
1642. Second
1653. Third
167and:
1691. One
1702. Two
1713. Three
173Loose using tabs:
1751. First
1772. Second
1793. Third
181and using spaces:
1831. One
1852. Two
1873. Three
189Multiple paragraphs:
1911. Item 1, graf one.
193 Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
1952. Item 2.
1973. Item 3.
199Nested
200------
202- Tab
203 - Tab
204 - Tab
206Here's another:
2081. First
2092. Second:
210 - Fee
211 - Fie
212 - Foe
2133. Third
215Same thing but with paragraphs:
2171. First
2192. Second:
221 - Fee
222 - Fie
223 - Foe
2253. Third
227Tabs and spaces
228---------------
230- this is a list item indented with tabs
232- this is a list item indented with spaces
234 - this is an example list item indented with tabs
236 - this is an example list item indented with spaces
238Fancy list markers
239------------------
241(2) begins with 2
242(3) and now 3
244 with a continuation
246 iv. sublist with roman numerals, starting with 4
247 v. more items
248 (A) a subsublist
249 (B) a subsublist
251Nesting:
253A. Upper Alpha
254 I. Upper Roman.
255 (6) Decimal start with 6
256 c) Lower alpha with paren
258Autonumbering:
2601. Autonumber.
2612. More.
262 1. Nested.
264Should not be a list item:
266M.A. 2007
268B. Williams
270------------------------------------------------------------------------------
272Definition Lists
273================
275Tight using spaces:
277apple
278: red fruit
280orange
281: orange fruit
283banana
284: yellow fruit
286Tight using tabs:
288apple
289: red fruit
291orange
292: orange fruit
294banana
295: yellow fruit
297Loose:
299apple
301: red fruit
303orange
305: orange fruit
307banana
309: yellow fruit
311Multiple blocks with italics:
313*apple*
315: red fruit
317 contains seeds, crisp, pleasant to taste
319*orange*
321: orange fruit
323 { orange code block }
325 > orange block quote
327Multiple definitions, tight:
329apple
330: red fruit
331: computer
333orange
334: orange fruit
335: bank
337Multiple definitions, loose:
339apple
341: red fruit
343: computer
345orange
347: orange fruit
349: bank
351Blank line after term, indented marker, alternate markers:
353apple
355: red fruit
357: computer
359orange
361: orange fruit
363 1. sublist
364 2. sublist
366HTML Blocks
367===========
369Simple block on one line:
371<div>
373foo
375</div>
377And nested without indentation:
379<div>
381<div>
383<div>
385foo
387</div>
389</div>
391<div>
393bar
395</div>
397</div>
399Interpreted markdown in a table:
401<table>
402<tr>
403<td>
404This is *emphasized*
405</td>
406<td>
407And this is **strong**
408</td>
409</tr>
410</table>
411<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
413Here's a simple block:
415<div>
417foo
419</div>
421This should be a code block, though:
423 <div>
424 foo
425 </div>
427As should this:
429 <div>foo</div>
431Now, nested:
433<div>
435<div>
437<div>
439foo
441</div>
443</div>
445</div>
447This should just be an HTML comment:
449<!-- Comment -->
451Multiline:
453<!--
454Blah
455Blah
456-->
457<!--
458 This is another comment.
459-->
461Code block:
463 <!-- Comment -->
465Just plain comment, with trailing spaces on the line:
467<!-- foo -->
469Code:
471 <hr />
473Hr's:
475<hr>
476<hr />
477<hr />
478<hr>
479<hr />
480<hr />
481<hr class="foo" id="bar" />
482<hr class="foo" id="bar" />
483<hr class="foo" id="bar">
485------------------------------------------------------------------------------
487Inline Markup
488=============
490This is *emphasized*, and so *is this*.
492This is **strong**, and so **is this**.
494An *[emphasized link](/url)*.
496***This is strong and em.***
498So is ***this*** word.
500***This is strong and em.***
502So is ***this*** word.
504This is code: `>`, `$`, `\`, `\$`, `<html>`.
506~~This is *strikeout*.~~
508Superscripts: a^bc^d a^*hello*^ a^hello there^.
510Subscripts: H~2~O, H~23~O, H~many of them~O.
512These should not be superscripts or subscripts, because of the unescaped
513spaces: a\^b c\^d, a\~b c\~d.
515------------------------------------------------------------------------------
517Smart quotes, ellipses, dashes
518==============================
520"Hello," said the spider. "'Shelob' is my name."
522'A', 'B', and 'C' are letters.
524'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'
526'He said, "I want to go."' Were you alive in the 70's?
528Here is some quoted '`code`' and a "[quoted
529link](http://example.com/?foo=1&bar=2)".
531Some dashes: one---two --- three---four --- five.
533Dashes between numbers: 5--7, 255--66, 1987--1999.
535Ellipses...and...and....
537------------------------------------------------------------------------------
539LaTeX
540=====
542- \cite[22-23]{smith.1899}
543- $2+2=4$
544- $x \in y$
545- $\alpha \wedge \omega$
546- $223$
547- $p$-Tree
548- Here's some display math:
549 $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
550- Here's one that has a line break in it: $\alpha + \omega \times x^2$.
552These shouldn't be math:
554- To get the famous equation, write `$e = mc^2$`.
555- \$22,000 is a *lot* of money. So is \$34,000. (It worked if "lot" is
556 emphasized.)
557- Shoes (\$20) and socks (\$5).
558- Escaped `$`: \$73 *this should be emphasized* 23\$.
560Here's a LaTeX table:
562\begin{tabular}{|l|l|}\hline
563Animal & Number \\ \hline
564Dog & 2 \\
565Cat & 1 \\ \hline
566\end{tabular}
568------------------------------------------------------------------------------
570Special Characters
571==================
573Here is some unicode:
575- I hat: Î
576- o umlaut: ö
577- section: §
578- set membership: ∈
579- copyright: ©
581AT&T has an ampersand in their name.
583AT&T is another way to write it.
585This & that.
5874 \< 5.
5896 \> 5.
591Backslash: \\
593Backtick: \`
595Asterisk: \*
597Underscore: \_
599Left brace: {
601Right brace: }
603Left bracket: \[
605Right bracket: \]
607Left paren: (
609Right paren: )
611Greater-than: \>
613Hash: \#
615Period: .
617Bang: !
619Plus: +
621Minus: -
623------------------------------------------------------------------------------
625Links
626=====
628Explicit
629--------
631Just a [URL](/url/).
633[URL and title](/url/ "title").
635[URL and title](/url/ "title preceded by two spaces").
637[URL and title](/url/ "title preceded by a tab").
639[URL and title](/url/ "title with "quotes" in it")
641[URL and title](/url/ "title with single quotes")
643[with\_underscore](/url/with_underscore)
645[Email link](mailto:nobody@nowhere.net)
647[Empty]().
649Reference
650---------
652Foo [bar](/url/).
654With [embedded \[brackets\]](/url/).
656[b](/url/) by itself should be a link.
658Indented [once](/url).
660Indented [twice](/url).
662Indented [thrice](/url).
664This should \[not\]\[\] be a link.
666 [not]: /url
668Foo [bar](/url/ "Title with "quotes" inside").
670Foo [biz](/url/ "Title with "quote" inside").
672With ampersands
673---------------
675Here's a [link with an ampersand in the URL](http://example.com/?foo=1&bar=2).
677Here's a link with an amersand in the link text:
678[AT&T](http://att.com/ "AT&T").
680Here's an [inline link](/script?foo=1&bar=2).
682Here's an [inline link in pointy braces](/script?foo=1&bar=2).
684Autolinks
685---------
687With an ampersand: <http://example.com/?foo=1&bar=2>
689- In a list?
690- <http://example.com/>
691- It should.
693An e-mail address: <nobody@nowhere.net>
695> Blockquoted: <http://example.com/>
697Auto-links should not occur here: `<http://example.com/>`
699 or here: <http://example.com/>
701------------------------------------------------------------------------------
703Images
704======
706From "Voyage dans la Lune" by Georges Melies (1902):
708![lalune](lalune.jpg "Voyage dans la Lune")
710Here is a movie ![movie](movie.jpg) icon.
712------------------------------------------------------------------------------
714Footnotes
715=========
717Here is a footnote reference,[^1] and another.[^2] This should *not* be a
718footnote reference, because it contains a space.\[\^my note\] Here is an
719inline note.[^3]
721> Notes can go in quotes.[^4]
7231. And in list items.[^5]
725This paragraph should not be part of the note, as it is not indented.
727[^1]: Here is the footnote. It can go anywhere after the footnote reference.
728 It need not be placed at the end of the document.
730[^2]: Here's the long note. This one contains multiple blocks.
732 Subsequent blocks are indented to show that they belong to the footnote
733 (as with list items).
735 { <code> }
737 If you want, you can indent every line, but you can also be lazy and just
738 indent the first line of each block.
740[^3]: This is *easier* to type. Inline notes may contain
741 [links](http://google.com) and `]` verbatim characters, as well as
742 \[bracketed text\].
744[^4]: In quote.
746[^5]: In list.