git.iko.soy/typeable/pandoc
on 1.5.0.1 help sign in
typeable/pandoc/tests/writer.plain
698 lines 8.2 kB history raw
1Pandoc Test Suite
2John MacFarlane; Anonymous
3July 17, 2006
5This is a set of tests for pandoc. Most of them are adapted from
6John Gruber's markdown test suite.
9* * * * *
11Headers
12=======
14Level 2 with an embedded link
15-----------------------------
17Level 3 with emphasis
19Level 4
21Level 5
23Level 1
24=======
26Level 2 with emphasis
27---------------------
29Level 3
31with no blank line
33Level 2
34-------
36with no blank line
39* * * * *
41Paragraphs
42==========
44Here's a regular paragraph.
46In Markdown 1.0.0 and earlier. Version 8. This line turns into a
47list item. Because a hard-wrapped line in the middle of a paragraph
48looked like a list item.
50Here's one with a bullet. * criminey.
52There should be a hard line break
53here.
56* * * * *
58Block Quotes
59============
61E-mail style:
63 This is a block quote. It is pretty short.
65 Code in a block quote:
67 sub status {
68 print "working";
69 }
71 A list:
73 1. item one
74 2. item two
76 Nested block quotes:
78 nested
80 nested
82This should not be a block quote: 2 > 1.
84And 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: \$ \\ \> \[ \{
109* * * * *
111Lists
112=====
114Unordered
115---------
117Asterisks tight:
119- asterisk 1
120- asterisk 2
121- asterisk 3
123Asterisks loose:
125- asterisk 1
127- asterisk 2
129- asterisk 3
132Pluses tight:
134- Plus 1
135- Plus 2
136- Plus 3
138Pluses loose:
140- Plus 1
142- Plus 2
144- Plus 3
147Minuses tight:
149- Minus 1
150- Minus 2
151- Minus 3
153Minuses loose:
155- Minus 1
157- Minus 2
159- Minus 3
162Ordered
163-------
165Tight:
1671. First
1682. Second
1693. Third
171and:
1731. One
1742. Two
1753. Three
177Loose using tabs:
1791. First
1812. Second
1833. Third
186and using spaces:
1881. One
1902. Two
1923. Three
195Multiple paragraphs:
1971. Item 1, graf one.
199 Item 1. graf two. The quick brown fox jumped over the lazy dog's
200 back.
2022. Item 2.
2043. Item 3.
207Nested
208------
210- Tab
211 - Tab
212 - Tab
216Here's another:
2181. First
2192. Second:
220 - Fee
221 - Fie
222 - Foe
2243. Third
226Same thing but with paragraphs:
2281. First
2302. Second:
232 - Fee
233 - Fie
234 - Foe
2363. Third
239Tabs and spaces
240---------------
242- this is a list item indented with tabs
244- this is a list item indented with spaces
246 - this is an example list item indented with tabs
248 - this is an example list item indented with spaces
252Fancy list markers
253------------------
255(2) begins with 2
256(3) and now 3
258 with a continuation
260 iv. sublist with roman numerals, starting with 4
261 v. more items
262 (A) a subsublist
263 (B) a subsublist
267Nesting:
269A. Upper Alpha
270 I. Upper Roman.
271 (6) Decimal start with 6
272 c) Lower alpha with paren
277Autonumbering:
2791. Autonumber.
2802. More.
281 1. Nested.
284Should not be a list item:
286M.A. 2007
288B. Williams
291* * * * *
293Definition Lists
294================
296Tight using spaces:
298apple
299 red fruit
300orange
301 orange fruit
302banana
303 yellow fruit
305Tight using tabs:
307apple
308 red fruit
309orange
310 orange fruit
311banana
312 yellow fruit
314Loose:
316apple
317 red fruit
319orange
320 orange fruit
322banana
323 yellow fruit
326Multiple blocks with italics:
328apple
329 red fruit
331 contains seeds, crisp, pleasant to taste
333orange
334 orange fruit
336 { orange code block }
338 orange block quote
341Multiple definitions, tight:
343apple
344 red fruit
345 computer
346orange
347 orange fruit
348 bank
350Multiple definitions, loose:
352apple
353 red fruit
355 computer
357orange
358 orange fruit
360 bank
363Blank line after term, indented marker, alternate markers:
365apple
366 red fruit
368 computer
370orange
371 orange fruit
373 1. sublist
374 2. sublist
377HTML Blocks
378===========
380Simple block on one line:
382foo
383And nested without indentation:
385foo
386bar
387Interpreted markdown in a table:
389This is emphasized
390And this is strong
391Here's a simple block:
393foo
394This should be a code block, though:
396 <div>
397 foo
398 </div>
400As should this:
402 <div>foo</div>
404Now, nested:
406foo
407This should just be an HTML comment:
409Multiline:
411Code block:
413 <!-- Comment -->
415Just plain comment, with trailing spaces on the line:
417Code:
419 <hr />
421Hr's:
424* * * * *
426Inline Markup
427=============
429This is emphasized, and so is this.
431This is strong, and so is this.
433An emphasized link.
435This is strong and em.
437So is this word.
439This is strong and em.
441So is this word.
443This is code: >, $, \, \$, <html>.
445This is strikeout.
447Superscripts: abcd ahello ahello there.
449Subscripts: H2O, H23O, Hmany of themO.
451These should not be superscripts or subscripts, because of the
452unescaped spaces: a^b c^d, a~b c~d.
455* * * * *
457Smart quotes, ellipses, dashes
458==============================
460"Hello," said the spider. "'Shelob' is my name."
462'A', 'B', and 'C' are letters.
464'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'
466'He said, "I want to go."' Were you alive in the 70's?
468Here is some quoted 'code' and a "quoted link".
470Some dashes: one--two -- three--four -- five.
472Dashes between numbers: 5-7, 255-66, 1987-1999.
474Ellipses...and...and....
477* * * * *
479LaTeX
480=====
482-
483- 2+2=4
484- x \in y
485- \alpha \wedge \omega
486- 223
487- p-Tree
488- Here's some display math:
489 \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
490- Here's one that has a line break in it:
491 \alpha + \omega \times x^2.
493These shouldn't be math:
495- To get the famous equation, write $e = mc^2$.
496- $22,000 is a lot of money. So is $34,000. (It worked if "lot"
497 is emphasized.)
498- Shoes ($20) and socks ($5).
499- Escaped $: $73 this should be emphasized 23$.
501Here's a LaTeX table:
506* * * * *
508Special Characters
509==================
511Here is some unicode:
513- I hat: Î
514- o umlaut: ö
515- section: §
516- set membership: ∈
517- copyright: ©
519AT&T has an ampersand in their name.
521AT&T is another way to write it.
523This & that.
5254 < 5.
5276 > 5.
529Backslash: \
531Backtick: `
533Asterisk: *
535Underscore: _
537Left brace: {
539Right brace: }
541Left bracket: [
543Right bracket: ]
545Left paren: (
547Right paren: )
549Greater-than: >
551Hash: #
553Period: .
555Bang: !
557Plus: +
559Minus: -
562* * * * *
564Links
565=====
567Explicit
568--------
570Just a URL.
572URL and title.
574URL and title.
576URL and title.
578URL and title
580URL and title
582with_underscore
584Email link
586Empty.
588Reference
589---------
591Foo bar.
593Foo bar.
595Foo bar.
597With embedded [brackets].
599b by itself should be a link.
601Indented once.
603Indented twice.
605Indented thrice.
607This should [not][] be a link.
609 [not]: /url
611Foo bar.
613Foo biz.
615With ampersands
616---------------
618Here's a link with an ampersand in the URL.
620Here's a link with an amersand in the link text: AT&T.
622Here's an inline link.
624Here's an inline link in pointy braces.
626Autolinks
627---------
629With an ampersand: http://example.com/?foo=1&bar=2
631- In a list?
632- http://example.com/
633- It should.
635An e-mail address: nobody@nowhere.net
637 Blockquoted: http://example.com/
639Auto-links should not occur here: <http://example.com/>
641 or here: <http://example.com/>
644* * * * *
646Images
647======
649From "Voyage dans la Lune" by Georges Melies (1902):
653Here is a movie icon.
656* * * * *
658Footnotes
659=========
661Here is a footnote reference,[^1] and another.[^2] This should not
662be a footnote reference, because it contains a space.[^my note]
663Here is an inline note.[^3]
665 Notes can go in quotes.[^4]
6671. And in list items.[^5]
669This paragraph should not be part of the note, as it is not
670indented.
673[^1]:
674 Here is the footnote. It can go anywhere after the footnote
675 reference. It need not be placed at the end of the document.
677[^2]:
678 Here's the long note. This one contains multiple blocks.
680 Subsequent blocks are indented to show that they belong to the
681 footnote (as with list items).
683 { <code> }
685 If you want, you can indent every line, but you can also be lazy
686 and just indent the first line of each block.
688[^3]:
689 This is easier to type. Inline notes may contain links and ]
690 verbatim characters, as well as [bracketed text].
692[^4]:
693 In quote.
695[^5]:
696 In list.