git.iko.soy/typeable/pandoc
on 1.14.0.4 help sign in
typeable/pandoc/tests/writer.plain
696 lines 8.9 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 John Gruber’s
6markdown test suite.
8------------------------------------------------------------------------------
12HEADERS
15Level 2 with an embedded link
17Level 3 with _emphasis_
19Level 4
21Level 5
25LEVEL 1
28Level 2 with _emphasis_
30Level 3
32with no blank line
35Level 2
37with no blank line
39------------------------------------------------------------------------------
43PARAGRAPHS
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------------------------------------------------------------------------------
61BLOCK QUOTES
64E-mail style:
66 This is a block quote. It is pretty short.
68 Code in a block quote:
70 sub status {
71 print "working";
72 }
74 A list:
76 1. item one
77 2. item two
79 Nested block quotes:
81 nested
83 nested
85This should not be a block quote: 2 > 1.
87And a following paragraph.
89------------------------------------------------------------------------------
93CODE BLOCKS
96Code:
98 ---- (should be four hyphens)
100 sub status {
101 print "working";
102 }
104 this code block is indented by one tab
106And:
108 this code block is indented by two tabs
110 These should not be escaped: \$ \\ \> \[ \{
112------------------------------------------------------------------------------
116LISTS
119Unordered
121Asterisks tight:
123- asterisk 1
124- asterisk 2
125- asterisk 3
127Asterisks loose:
129- asterisk 1
131- asterisk 2
133- asterisk 3
135Pluses tight:
137- Plus 1
138- Plus 2
139- Plus 3
141Pluses loose:
143- Plus 1
145- Plus 2
147- Plus 3
149Minuses tight:
151- Minus 1
152- Minus 2
153- Minus 3
155Minuses loose:
157- Minus 1
159- Minus 2
161- Minus 3
164Ordered
166Tight:
1681. First
1692. Second
1703. Third
172and:
1741. One
1752. Two
1763. Three
178Loose using tabs:
1801. First
1822. Second
1843. Third
186and using spaces:
1881. One
1902. Two
1923. Three
194Multiple paragraphs:
1961. Item 1, graf one.
198 Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
2002. Item 2.
2023. Item 3.
205Nested
207- Tab
208 - Tab
209 - Tab
211Here’s another:
2131. First
2142. Second:
215 - Fee
216 - Fie
217 - Foe
2193. Third
221Same thing but with paragraphs:
2231. First
2252. Second:
227 - Fee
228 - Fie
229 - Foe
2313. Third
234Tabs and spaces
236- this is a list item indented with tabs
238- this is a list item indented with spaces
240 - this is an example list item indented with tabs
242 - this is an example list item indented with spaces
245Fancy list markers
247(2) begins with 2
248(3) and now 3
250 with a continuation
252 iv. sublist with roman numerals, starting with 4
253 v. more items
254 (A) a subsublist
255 (B) a subsublist
257Nesting:
259A. Upper Alpha
260 I. Upper Roman.
261 (6) Decimal start with 6
262 c) Lower alpha with paren
264Autonumbering:
2661. Autonumber.
2672. More.
268 1. Nested.
270Should not be a list item:
272M.A. 2007
274B. Williams
276------------------------------------------------------------------------------
280DEFINITION LISTS
283Tight using spaces:
285apple
286 red fruit
288orange
289 orange fruit
291banana
292 yellow fruit
294Tight using tabs:
296apple
297 red fruit
299orange
300 orange fruit
302banana
303 yellow fruit
305Loose:
307apple
309 red fruit
311orange
313 orange fruit
315banana
317 yellow fruit
319Multiple blocks with italics:
321_apple_
323 red fruit
325 contains seeds, crisp, pleasant to taste
327_orange_
329 orange fruit
331 { orange code block }
333 orange block quote
335Multiple definitions, tight:
337apple
338 red fruit
339 computer
341orange
342 orange fruit
343 bank
345Multiple definitions, loose:
347apple
349 red fruit
351 computer
353orange
355 orange fruit
357 bank
359Blank line after term, indented marker, alternate markers:
361apple
363 red fruit
365 computer
367orange
369 orange fruit
371 1. sublist
372 2. sublist
376HTML BLOCKS
379Simple block on one line:
381foo
383And nested without indentation:
385foo
387bar
389Interpreted markdown in a table:
391This is _emphasized_
392And this is STRONG
393Here’s a simple block:
395foo
397This should be a code block, though:
399 <div>
400 foo
401 </div>
403As should this:
405 <div>foo</div>
407Now, nested:
409foo
411This should just be an HTML comment:
413Multiline:
415Code block:
417 <!-- Comment -->
419Just plain comment, with trailing spaces on the line:
421Code:
423 <hr />
425Hr’s:
427------------------------------------------------------------------------------
431INLINE MARKUP
434This is _emphasized_, and so _is this_.
436This is STRONG, and so IS THIS.
438An _emphasized link_.
440_THIS IS STRONG AND EM._
442So is _THIS_ word.
444_THIS IS STRONG AND EM._
446So is _THIS_ word.
448This is code: >, $, \, \$, <html>.
450~~This is _strikeout_.~~
452Superscripts: a^bc^d a^_hello_^ a^hello there^.
454Subscripts: H~2~O, H~23~O, H~many of them~O.
456These should not be superscripts or subscripts, because of the unescaped
457spaces: a^b c^d, a~b c~d.
459------------------------------------------------------------------------------
463SMART QUOTES, ELLIPSES, DASHES
466“Hello,” said the spider. “‘Shelob’ is my name.”
468‘A’, ‘B’, and ‘C’ are letters.
470‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
472‘He said, “I want to go.”’ Were you alive in the 70’s?
474Here is some quoted ‘code’ and a “quoted link”.
476Some dashes: one—two — three—four — five.
478Dashes between numbers: 5–7, 255–66, 1987–1999.
480Ellipses…and…and….
482------------------------------------------------------------------------------
486LATEX
489-
490- 2 + 2 = 4
491- x ∈ y
492- α ∧ ω
493- 223
494- p-Tree
495- Here’s some display math:
496 $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
497- Here’s one that has a line break in it: α + ω × x^2^.
499These shouldn’t be math:
501- To get the famous equation, write $e = mc^2$.
502- $22,000 is a _lot_ of money. So is $34,000. (It worked if “lot”
503 is emphasized.)
504- Shoes ($20) and socks ($5).
505- Escaped $: $73 _this should be emphasized_ 23$.
507Here’s a LaTeX table:
509------------------------------------------------------------------------------
513SPECIAL CHARACTERS
516Here is some unicode:
518- I hat: Î
519- o umlaut: ö
520- section: §
521- set membership: ∈
522- copyright: ©
524AT&T has an ampersand in their name.
526AT&T is another way to write it.
528This & that.
5304 < 5.
5326 > 5.
534Backslash: \
536Backtick: `
538Asterisk: *
540Underscore: _
542Left brace: {
544Right brace: }
546Left bracket: [
548Right bracket: ]
550Left paren: (
552Right paren: )
554Greater-than: >
556Hash: #
558Period: .
560Bang: !
562Plus: +
564Minus: -
566------------------------------------------------------------------------------
570LINKS
573Explicit
575Just a URL.
577URL and title.
579URL and title.
581URL and title.
583URL and title
585URL and title
587with_underscore
589Email link
591Empty.
594Reference
596Foo bar.
598Foo bar.
600Foo bar.
602With embedded [brackets].
604b by itself should be a link.
606Indented once.
608Indented twice.
610Indented thrice.
612This should [not][] be a link.
614 [not]: /url
616Foo bar.
618Foo biz.
621With ampersands
623Here’s a link with an ampersand in the URL.
625Here’s a link with an amersand in the link text: AT&T.
627Here’s an inline link.
629Here’s an inline link in pointy braces.
632Autolinks
634With an ampersand: http://example.com/?foo=1&bar=2
636- In a list?
637- http://example.com/
638- It should.
640An e-mail address: nobody@nowhere.net
642 Blockquoted: http://example.com/
644Auto-links should not occur here: <http://example.com/>
646 or here: <http://example.com/>
648------------------------------------------------------------------------------
652IMAGES
655From “Voyage dans la Lune” by Georges Melies (1902):
657[lalune]
659Here is a movie [movie] icon.
661------------------------------------------------------------------------------
665FOOTNOTES
668Here is a footnote reference,[1] and another.[2] This should _not_ be a
669footnote reference, because it contains a space.[^my note] Here is an inline
670note.[3]
672 Notes can go in quotes.[4]
6741. And in list items.[5]
676This paragraph should not be part of the note, as it is not indented.
678[1] Here is the footnote. It can go anywhere after the footnote reference. It
679need not be placed at the end of the document.
681[2] Here’s the long note. This one contains multiple blocks.
683Subsequent blocks are indented to show that they belong to the footnote (as
684with list items).
686 { <code> }
688If you want, you can indent every line, but you can also be lazy and just
689indent the first line of each block.
691[3] This is _easier_ to type. Inline notes may contain links and ] verbatim
692characters, as well as [bracketed text].
694[4] In quote.
696[5] In list.