git.iko.soy/typeable/pandoc
on 34412cf help sign in
typeable/pandoc/test/writer.plain
695 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
2183. Third
220Same thing but with paragraphs:
2221. First
2242. Second:
226 - Fee
227 - Fie
228 - Foe
2303. Third
233Tabs and spaces
235- this is a list item indented with tabs
237- this is a list item indented with spaces
239 - this is an example list item indented with tabs
241 - this is an example list item indented with spaces
244Fancy list markers
246(2) begins with 2
247(3) and now 3
249 with a continuation
251 iv. sublist with roman numerals, starting with 4
252 v. more items
253 (A) a subsublist
254 (B) a subsublist
256Nesting:
258A. Upper Alpha
259 I. Upper Roman.
260 (6) Decimal start with 6
261 c) Lower alpha with paren
263Autonumbering:
2651. Autonumber.
2662. More.
267 1. Nested.
269Should not be a list item:
271M.A. 2007
273B. Williams
275------------------------------------------------------------------------------
279DEFINITION LISTS
282Tight using spaces:
284apple
285 red fruit
287orange
288 orange fruit
290banana
291 yellow fruit
293Tight using tabs:
295apple
296 red fruit
298orange
299 orange fruit
301banana
302 yellow fruit
304Loose:
306apple
308 red fruit
310orange
312 orange fruit
314banana
316 yellow fruit
318Multiple blocks with italics:
320_apple_
322 red fruit
324 contains seeds, crisp, pleasant to taste
326_orange_
328 orange fruit
330 { orange code block }
332 orange block quote
334Multiple definitions, tight:
336apple
337 red fruit
338 computer
340orange
341 orange fruit
342 bank
344Multiple definitions, loose:
346apple
348 red fruit
350 computer
352orange
354 orange fruit
356 bank
358Blank line after term, indented marker, alternate markers:
360apple
362 red fruit
364 computer
366orange
368 orange fruit
370 1. sublist
371 2. sublist
375HTML BLOCKS
378Simple block on one line:
380foo
382And nested without indentation:
384foo
386bar
388Interpreted markdown in a table:
390This is _emphasized_
391And this is STRONG
392Here’s a simple block:
394foo
396This should be a code block, though:
398 <div>
399 foo
400 </div>
402As should this:
404 <div>foo</div>
406Now, nested:
408foo
410This should just be an HTML comment:
412Multiline:
414Code block:
416 <!-- Comment -->
418Just plain comment, with trailing spaces on the line:
420Code:
422 <hr />
424Hr’s:
426------------------------------------------------------------------------------
430INLINE MARKUP
433This is _emphasized_, and so _is this_.
435This is STRONG, and so IS THIS.
437An _emphasized link_.
439_THIS IS STRONG AND EM._
441So is _THIS_ word.
443_THIS IS STRONG AND EM._
445So is _THIS_ word.
447This is code: >, $, \, \$, <html>.
449~~This is _strikeout_.~~
451Superscripts: abcd a_hello_ ahello there.
453Subscripts: H₂O, H₂₃O, Hmany of themO.
455These should not be superscripts or subscripts, because of the unescaped
456spaces: a^b c^d, a~b c~d.
458------------------------------------------------------------------------------
462SMART QUOTES, ELLIPSES, DASHES
465“Hello,” said the spider. “‘Shelob’ is my name.”
467‘A’, ‘B’, and ‘C’ are letters.
469‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
471‘He said, “I want to go.”’ Were you alive in the 70’s?
473Here is some quoted ‘code’ and a “quoted link”.
475Some dashes: one—two — three—four — five.
477Dashes between numbers: 5–7, 255–66, 1987–1999.
479Ellipses…and…and….
481------------------------------------------------------------------------------
485LATEX
488-
489- 2 + 2 = 4
490- x ∈ y
491- α ∧ ω
492- 223
493- p-Tree
494- Here’s some display math:
495 $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
496- Here’s one that has a line break in it: α + ω × x².
498These shouldn’t be math:
500- To get the famous equation, write $e = mc^2$.
501- $22,000 is a _lot_ of money. So is $34,000. (It worked if “lot” is
502 emphasized.)
503- Shoes ($20) and socks ($5).
504- Escaped $: $73 _this should be emphasized_ 23$.
506Here’s a LaTeX table:
508------------------------------------------------------------------------------
512SPECIAL CHARACTERS
515Here is some unicode:
517- I hat: Î
518- o umlaut: ö
519- section: §
520- set membership: ∈
521- copyright: ©
523AT&T has an ampersand in their name.
525AT&T is another way to write it.
527This & that.
5294 < 5.
5316 > 5.
533Backslash: \
535Backtick: `
537Asterisk: *
539Underscore: _
541Left brace: {
543Right brace: }
545Left bracket: [
547Right bracket: ]
549Left paren: (
551Right paren: )
553Greater-than: >
555Hash: #
557Period: .
559Bang: !
561Plus: +
563Minus: -
565------------------------------------------------------------------------------
569LINKS
572Explicit
574Just a URL.
576URL and title.
578URL and title.
580URL and title.
582URL and title
584URL and title
586with_underscore
588Email link
590Empty.
593Reference
595Foo bar.
597Foo bar.
599Foo bar.
601With embedded [brackets].
603b by itself should be a link.
605Indented once.
607Indented twice.
609Indented thrice.
611This should [not][] be a link.
613 [not]: /url
615Foo bar.
617Foo biz.
620With ampersands
622Here’s a link with an ampersand in the URL.
624Here’s a link with an amersand in the link text: AT&T.
626Here’s an inline link.
628Here’s an inline link in pointy braces.
631Autolinks
633With an ampersand: http://example.com/?foo=1&bar=2
635- In a list?
636- http://example.com/
637- It should.
639An e-mail address: nobody@nowhere.net
641 Blockquoted: http://example.com/
643Auto-links should not occur here: <http://example.com/>
645 or here: <http://example.com/>
647------------------------------------------------------------------------------
651IMAGES
654From “Voyage dans la Lune” by Georges Melies (1902):
656[lalune]
658Here is a movie [movie] icon.
660------------------------------------------------------------------------------
664FOOTNOTES
667Here is a footnote reference,[1] and another.[2] This should _not_ be a
668footnote reference, because it contains a space.[^my note] Here is an inline
669note.[3]
671 Notes can go in quotes.[4]
6731. And in list items.[5]
675This paragraph should not be part of the note, as it is not indented.
677[1] Here is the footnote. It can go anywhere after the footnote reference. It
678need not be placed at the end of the document.
680[2] Here’s the long note. This one contains multiple blocks.
682Subsequent blocks are indented to show that they belong to the footnote (as
683with list items).
685 { <code> }
687If you want, you can indent every line, but you can also be lazy and just
688indent the first line of each block.
690[3] This is _easier_ to type. Inline notes may contain links and ] verbatim
691characters, as well as [bracketed text].
693[4] In quote.
695[5] In list.