git.iko.soy/typeable/pandoc
on rc/test4 help sign in
typeable/pandoc/test/writer.asciidoc
648 lines 8.3 kB history raw
1= Pandoc 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'''''
10== Headers
12=== Level 2 with an link:/url[embedded link]
14==== Level 3 with _emphasis_
16===== Level 4
18====== Level 5
20== Level 1
22=== Level 2 with _emphasis_
24==== Level 3
26with no blank line
28=== Level 2
30with no blank line
32'''''
34== Paragraphs
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'''''
49== Block Quotes
51E-mail style:
53____
54This is a block quote. It is pretty short.
55____
57____
58--
59Code in a block quote:
61....
62sub status {
63 print "working";
65....
67A list:
69[arabic]
70. item one
71. item two
73Nested block quotes:
75____
76nested
77____
79____
80nested
81____
83--
84____
86This should not be a block quote: 2 > 1.
88And a following paragraph.
90'''''
92== Code Blocks
94Code:
96....
97---- (should be four hyphens)
99sub status {
100 print "working";
103this code block is indented by one tab
104....
106And:
108....
109 this code block is indented by two tabs
111These should not be escaped: \$ \\ \> \[ \{
112....
114'''''
116== Lists
118=== Unordered
120Asterisks tight:
122* asterisk 1
123* asterisk 2
124* asterisk 3
126Asterisks loose:
128* asterisk 1
129* asterisk 2
130* asterisk 3
132Pluses tight:
134* Plus 1
135* Plus 2
136* Plus 3
138Pluses loose:
140* Plus 1
141* Plus 2
142* Plus 3
144Minuses tight:
146* Minus 1
147* Minus 2
148* Minus 3
150Minuses loose:
152* Minus 1
153* Minus 2
154* Minus 3
156=== Ordered
158Tight:
160[arabic]
161. First
162. Second
163. Third
165and:
167[arabic]
168. One
169. Two
170. Three
172Loose using tabs:
174[arabic]
175. First
176. Second
177. Third
179and using spaces:
181[arabic]
182. One
183. Two
184. Three
186Multiple paragraphs:
188[arabic]
189. Item 1, graf one.
191Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
192. Item 2.
193. Item 3.
195=== Nested
197* Tab
198** Tab
199*** Tab
201Here’s another:
203[arabic]
204. First
205. Second:
206* Fee
207* Fie
208* Foe
209. Third
211Same thing but with paragraphs:
213[arabic]
214. First
215. Second:
216* Fee
217* Fie
218* Foe
219. Third
221=== Tabs and spaces
223* this is a list item indented with tabs
224* this is a list item indented with spaces
225** this is an example list item indented with tabs
226** this is an example list item indented with spaces
228=== Fancy list markers
230[arabic, start=2]
231. begins with 2
232. and now 3
234with a continuation
235[lowerroman, start=4]
236.. sublist with roman numerals, starting with 4
237.. more items
238[upperalpha]
239... a subsublist
240... a subsublist
242Nesting:
244[upperalpha]
245. Upper Alpha
246[upperroman]
247.. Upper Roman.
248[arabic, start=6]
249... Decimal start with 6
250[loweralpha, start=3]
251.... Lower alpha with paren
253Autonumbering:
255. Autonumber.
256. More.
257.. Nested.
259Should not be a list item:
261M.A. 2007
263B. Williams
265'''''
267== Definition Lists
269Tight using spaces:
271apple::
272 red fruit
273orange::
274 orange fruit
275banana::
276 yellow fruit
278Tight using tabs:
280apple::
281 red fruit
282orange::
283 orange fruit
284banana::
285 yellow fruit
287Loose:
289apple::
290 red fruit
291orange::
292 orange fruit
293banana::
294 yellow fruit
296Multiple blocks with italics:
298_apple_::
299 red fruit
300 +
301 contains seeds, crisp, pleasant to taste
302_orange_::
303 orange fruit
304 +
305....
306{ orange code block }
307....
308 +
309 ____
310 orange block quote
311 ____
313Multiple definitions, tight:
315apple::
316 red fruit
317 +
318 computer
319orange::
320 orange fruit
321 +
322 bank
324Multiple definitions, loose:
326apple::
327 red fruit
328 +
329 computer
330orange::
331 orange fruit
332 +
333 bank
335Blank line after term, indented marker, alternate markers:
337apple::
338 red fruit
339 +
340 computer
341orange::
342 orange fruit
343 +
344 [arabic]
345 . sublist
346 . sublist
348== HTML Blocks
350Simple block on one line:
352foo
354And nested without indentation:
356foo
358bar
360Interpreted markdown in a table:
362This is _emphasized_
364And this is *strong*
366Here’s a simple block:
368foo
370This should be a code block, though:
372....
373<div>
374 foo
375</div>
376....
378As should this:
380....
381<div>foo</div>
382....
384Now, nested:
386foo
388This should just be an HTML comment:
390Multiline:
392Code block:
394....
395<!-- Comment -->
396....
398Just plain comment, with trailing spaces on the line:
400Code:
402....
403<hr />
404....
406Hr’s:
408'''''
410== Inline Markup
412This is _emphasized_, and so _is this_.
414This is *strong*, and so *is this*.
416An _link:/url[emphasized link]_.
418*_This is strong and em._*
420So is *_this_* word.
422*_This is strong and em._*
424So is *_this_* word.
426This is code: `>`, `$`, `\`, `\$`, `<html>`.
428[line-through]*This is _strikeout_.*
430Superscripts: a^bc^d a^_hello_^ a^hello there^.
432Subscripts: H~2~O, H~23~O, H~many of them~O.
434These should not be superscripts or subscripts, because of the unescaped
435spaces: a^b c^d, a~b c~d.
437'''''
439== Smart quotes, ellipses, dashes
441``Hello,'' said the spider. ```Shelob' is my name.''
443`A', `B', and `C' are letters.
445`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
447`He said, ``I want to go.''' Were you alive in the 70’s?
449Here is some quoted ``code`' and a ``http://example.com/?foo=1&bar=2[quoted
450link]''.
452Some dashes: one—two — three—four — five.
454Dashes between numbers: 5–7, 255–66, 1987–1999.
456Ellipses…and…and….
458'''''
460== LaTeX
462*
463* latexmath:[$2+2=4$]
464* latexmath:[$x \in y$]
465* latexmath:[$\alpha \wedge \omega$]
466* latexmath:[$223$]
467* latexmath:[$p$]-Tree
468* Here’s some display math:
470[latexmath]
471++++
472\[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]
473++++
474* Here’s one that has a line break in it:
475latexmath:[$\alpha + \omega \times x^2$].
477These shouldn’t be math:
479* To get the famous equation, write `$e = mc^2$`.
480* $22,000 is a _lot_ of money. So is $34,000. (It worked if ``lot'' is
481emphasized.)
482* Shoes ($20) and socks ($5).
483* Escaped `$`: $73 _this should be emphasized_ 23$.
485Here’s a LaTeX table:
487'''''
489== Special Characters
491Here is some unicode:
493* I hat: Î
494* o umlaut: ö
495* section: §
496* set membership: ∈
497* copyright: ©
499AT&T has an ampersand in their name.
501AT&T is another way to write it.
503This & that.
5054 < 5.
5076 > 5.
509Backslash: \
511Backtick: `
513Asterisk: *
515Underscore: _
517Left brace: \{
519Right brace: }
521Left bracket: [
523Right bracket: ]
525Left paren: (
527Right paren: )
529Greater-than: >
531Hash: #
533Period: .
535Bang: !
537Plus: +
539Minus: -
541'''''
543== Links
545=== Explicit
547Just a link:/url/[URL].
549link:/url/[URL and title].
551link:/url/[URL and title].
553link:/url/[URL and title].
555link:/url/[URL and title]
557link:/url/[URL and title]
559link:/url/with_underscore[with_underscore]
561mailto:nobody@nowhere.net[Email link]
563link:[Empty].
565=== Reference
567Foo link:/url/[bar].
569With link:/url/[embedded [brackets]].
571link:/url/[b] by itself should be a link.
573Indented link:/url[once].
575Indented link:/url[twice].
577Indented link:/url[thrice].
579This should [not][] be a link.
581....
582[not]: /url
583....
585Foo link:/url/[bar].
587Foo link:/url/[biz].
589=== With ampersands
591Here’s a http://example.com/?foo=1&bar=2[link with an ampersand in the URL].
593Here’s a link with an amersand in the link text: http://att.com/[AT&T].
595Here’s an link:/script?foo=1&bar=2[inline link].
597Here’s an link:/script?foo=1&bar=2[inline link in pointy braces].
599=== Autolinks
601With an ampersand: http://example.com/?foo=1&bar=2
603* In a list?
604* http://example.com/
605* It should.
607An e-mail address: nobody@nowhere.net
609____
610Blockquoted: http://example.com/
611____
613Auto-links should not occur here: `<http://example.com/>`
615....
616or here: <http://example.com/>
617....
619'''''
621== Images
623From ``Voyage dans la Lune'' by Georges Melies (1902):
625image::lalune.jpg[lalune,title="Voyage dans la Lune"]
627Here is a movie image:movie.jpg[movie] icon.
629'''''
631== Footnotes
633Here is a footnote reference,footnote:[Here is the footnote. It can go
634anywhere after the footnote reference. It need not be placed at the end of the
635document.] and another.[multiblock footnote omitted] This should _not_ be a
636footnote reference, because it contains a space.[^my note] Here is an inline
637note.footnote:[This is _easier_ to type. Inline notes may contain
638http://google.com[links] and `]` verbatim characters, as well as [bracketed
639text].]
641____
642Notes can go in quotes.footnote:[In quote.]
643____
645[arabic]
646. And in list items.footnote:[In list.]
648This paragraph should not be part of the note, as it is not indented.