git.iko.soy/typeable/pandoc
on rc/2.11.0.4 help sign in
typeable/pandoc/test/writer.plain
638 lines 8.8 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------------------------------------------------------------------------------
10Headers
12Level 2 with an embedded link
14Level 3 with emphasis
16Level 4
18Level 5
20Level 1
22Level 2 with emphasis
24Level 3
26with no blank line
28Level 2
30with no blank line
32------------------------------------------------------------------------------
34Paragraphs
36Here’s a regular paragraph.
38In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
39Because a hard-wrapped line in the middle of a paragraph looked like a list
40item.
42Here’s one with a bullet. * criminey.
44There should be a hard line break
45here.
47------------------------------------------------------------------------------
49Block Quotes
51E-mail style:
53 This is a block quote. It is pretty short.
55 Code in a block quote:
57 sub status {
58 print "working";
59 }
61 A list:
63 1. item one
64 2. item two
66 Nested block quotes:
68 nested
70 nested
72This should not be a block quote: 2 > 1.
74And a following paragraph.
76------------------------------------------------------------------------------
78Code Blocks
80Code:
82 ---- (should be four hyphens)
84 sub status {
85 print "working";
86 }
88 this code block is indented by one tab
90And:
92 this code block is indented by two tabs
94 These should not be escaped: \$ \\ \> \[ \{
96------------------------------------------------------------------------------
98Lists
100Unordered
102Asterisks tight:
104- asterisk 1
105- asterisk 2
106- asterisk 3
108Asterisks loose:
110- asterisk 1
112- asterisk 2
114- asterisk 3
116Pluses tight:
118- Plus 1
119- Plus 2
120- Plus 3
122Pluses loose:
124- Plus 1
126- Plus 2
128- Plus 3
130Minuses tight:
132- Minus 1
133- Minus 2
134- Minus 3
136Minuses loose:
138- Minus 1
140- Minus 2
142- Minus 3
144Ordered
146Tight:
1481. First
1492. Second
1503. Third
152and:
1541. One
1552. Two
1563. Three
158Loose using tabs:
1601. First
1622. Second
1643. Third
166and using spaces:
1681. One
1702. Two
1723. Three
174Multiple paragraphs:
1761. Item 1, graf one.
178 Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
1802. Item 2.
1823. Item 3.
184Nested
186- Tab
187 - Tab
188 - Tab
190Here’s another:
1921. First
1932. Second:
194 - Fee
195 - Fie
196 - Foe
1973. Third
199Same thing but with paragraphs:
2011. First
2032. Second:
205 - Fee
206 - Fie
207 - Foe
2093. Third
211Tabs and spaces
213- this is a list item indented with tabs
215- this is a list item indented with spaces
217 - this is an example list item indented with tabs
219 - this is an example list item indented with spaces
221Fancy list markers
223(2) begins with 2
225(3) and now 3
227 with a continuation
229 iv. sublist with roman numerals, starting with 4
230 v. more items
231 (A) a subsublist
232 (B) a subsublist
234Nesting:
236A. Upper Alpha
237 I. Upper Roman.
238 (6) Decimal start with 6
239 c) Lower alpha with paren
241Autonumbering:
2431. Autonumber.
2442. More.
245 1. Nested.
247Should not be a list item:
249M.A. 2007
251B. Williams
253------------------------------------------------------------------------------
255Definition Lists
257Tight using spaces:
259apple
260 red fruit
262orange
263 orange fruit
265banana
266 yellow fruit
268Tight using tabs:
270apple
271 red fruit
273orange
274 orange fruit
276banana
277 yellow fruit
279Loose:
281apple
283 red fruit
285orange
287 orange fruit
289banana
291 yellow fruit
293Multiple blocks with italics:
295apple
297 red fruit
299 contains seeds, crisp, pleasant to taste
301orange
303 orange fruit
305 { orange code block }
307 orange block quote
309Multiple definitions, tight:
311apple
312 red fruit
313 computer
315orange
316 orange fruit
317 bank
319Multiple definitions, loose:
321apple
323 red fruit
325 computer
327orange
329 orange fruit
331 bank
333Blank line after term, indented marker, alternate markers:
335apple
337 red fruit
339 computer
341orange
343 orange fruit
345 1. sublist
346 2. sublist
348HTML Blocks
350Simple block on one line:
352foo
354And nested without indentation:
356foo
358bar
360Interpreted markdown in a table:
362This is emphasized
363And this is strong
364Here’s a simple block:
366foo
368This should be a code block, though:
370 <div>
371 foo
372 </div>
374As should this:
376 <div>foo</div>
378Now, nested:
380foo
382This should just be an HTML comment:
384Multiline:
386Code block:
388 <!-- Comment -->
390Just plain comment, with trailing spaces on the line:
392Code:
394 <hr />
396Hr’s:
398------------------------------------------------------------------------------
400Inline Markup
402This is emphasized, and so is this.
404This is strong, and so is this.
406An emphasized link.
408This is strong and em.
410So is this word.
412This is strong and em.
414So is this word.
416This is code: >, $, \, \$, <html>.
418~~This is strikeout.~~
420Superscripts: a^(bc)d a^(hello) a^(hello there).
422Subscripts: H₂O, H₂₃O, H_(many of them)O.
424These should not be superscripts or subscripts, because of the unescaped
425spaces: a^b c^d, a~b c~d.
427------------------------------------------------------------------------------
429Smart quotes, ellipses, dashes
431“Hello,” said the spider. “‘Shelob’ is my name.”
433‘A’, ‘B’, and ‘C’ are letters.
435‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
437‘He said, “I want to go.”’ Were you alive in the 70’s?
439Here is some quoted ‘code’ and a “quoted link”.
441Some dashes: one—two — three—four — five.
443Dashes between numbers: 5–7, 255–66, 1987–1999.
445Ellipses…and…and….
447------------------------------------------------------------------------------
449LaTeX
451-
452- 2 + 2 = 4
453- x ∈ y
454- α ∧ ω
455- 223
456- p-Tree
457- Here’s some display math:
458 $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
459- Here’s one that has a line break in it: α + ω × x².
461These shouldn’t be math:
463- To get the famous equation, write $e = mc^2$.
464- $22,000 is a lot of money. So is $34,000. (It worked if “lot” is
465 emphasized.)
466- Shoes ($20) and socks ($5).
467- Escaped $: $73 this should be emphasized 23$.
469Here’s a LaTeX table:
471------------------------------------------------------------------------------
473Special Characters
475Here is some unicode:
477- I hat: Î
478- o umlaut: ö
479- section: §
480- set membership: ∈
481- copyright: ©
483AT&T has an ampersand in their name.
485AT&T is another way to write it.
487This & that.
4894 < 5.
4916 > 5.
493Backslash: \
495Backtick: `
497Asterisk: *
499Underscore: _
501Left brace: {
503Right brace: }
505Left bracket: [
507Right bracket: ]
509Left paren: (
511Right paren: )
513Greater-than: >
515Hash: #
517Period: .
519Bang: !
521Plus: +
523Minus: -
525------------------------------------------------------------------------------
527Links
529Explicit
531Just a URL.
533URL and title.
535URL and title.
537URL and title.
539URL and title
541URL and title
543with_underscore
545Email link
547Empty.
549Reference
551Foo bar.
553With embedded [brackets].
555b by itself should be a link.
557Indented once.
559Indented twice.
561Indented thrice.
563This should [not][] be a link.
565 [not]: /url
567Foo bar.
569Foo biz.
571With ampersands
573Here’s a link with an ampersand in the URL.
575Here’s a link with an amersand in the link text: AT&T.
577Here’s an inline link.
579Here’s an inline link in pointy braces.
581Autolinks
583With an ampersand: http://example.com/?foo=1&bar=2
585- In a list?
586- http://example.com/
587- It should.
589An e-mail address: nobody@nowhere.net
591 Blockquoted: http://example.com/
593Auto-links should not occur here: <http://example.com/>
595 or here: <http://example.com/>
597------------------------------------------------------------------------------
599Images
601From “Voyage dans la Lune” by Georges Melies (1902):
603[lalune]
605Here is a movie [movie] icon.
607------------------------------------------------------------------------------
609Footnotes
611Here is a footnote reference,[1] and another.[2] This should not be a footnote
612reference, because it contains a space.[^my note] Here is an inline note.[3]
614 Notes can go in quotes.[4]
6161. And in list items.[5]
618This paragraph should not be part of the note, as it is not indented.
620[1] Here is the footnote. It can go anywhere after the footnote reference. It
621need not be placed at the end of the document.
623[2] Here’s the long note. This one contains multiple blocks.
625Subsequent blocks are indented to show that they belong to the footnote (as
626with list items).
628 { <code> }
630If you want, you can indent every line, but you can also be lazy and just
631indent the first line of each block.
633[3] This is easier to type. Inline notes may contain links and ] verbatim
634characters, as well as [bracketed text].
636[4] In quote.
638[5] In list.