git.iko.soy/typeable/pandoc
on 2.0 help sign in
typeable/pandoc/test/writer.asciidoc
689 lines 9.2 kB history raw
1Pandoc Test Suite
2=================
3John MacFarlane; Anonymous
4July 17, 2006
6This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
7markdown test suite.
9'''''
11[[headers]]
12Headers
13-------
15[[level-2-with-an-embedded-link]]
16Level 2 with an link:/url[embedded link]
17~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19[[level-3-with-emphasis]]
20Level 3 with _emphasis_
21^^^^^^^^^^^^^^^^^^^^^^^
23[[level-4]]
24Level 4
25+++++++
27[[level-5]]
28Level 5
30[[level-1]]
31Level 1
32-------
34[[level-2-with-emphasis]]
35Level 2 with _emphasis_
36~~~~~~~~~~~~~~~~~~~~~~~
38[[level-3]]
39Level 3
40^^^^^^^
42with no blank line
44[[level-2]]
45Level 2
46~~~~~~~
48with no blank line
50'''''
52[[paragraphs]]
53Paragraphs
54----------
56Here’s a regular paragraph.
58In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
59Because a hard-wrapped line in the middle of a paragraph looked like a list
60item.
62Here’s one with a bullet. * criminey.
64There should be a hard line break +
65here.
67'''''
69[[block-quotes]]
70Block Quotes
71------------
73E-mail style:
75__________________________________________
76This is a block quote. It is pretty short.
77__________________________________________
79______________________
80--
81Code in a block quote:
83....
84sub status {
85 print "working";
87....
89A list:
911. item one
922. item two
94Nested block quotes:
96______
97nested
98______
100______
101nested
102______
104--
105______________________
107This should not be a block quote: 2 > 1.
109And a following paragraph.
111'''''
113[[code-blocks]]
114Code Blocks
115-----------
117Code:
119....
120---- (should be four hyphens)
122sub status {
123 print "working";
126this code block is indented by one tab
127....
129And:
131....
132 this code block is indented by two tabs
134These should not be escaped: \$ \\ \> \[ \{
135....
137'''''
139[[lists]]
140Lists
141-----
143[[unordered]]
144Unordered
145~~~~~~~~~
147Asterisks tight:
149* asterisk 1
150* asterisk 2
151* asterisk 3
153Asterisks loose:
155* asterisk 1
156* asterisk 2
157* asterisk 3
159Pluses tight:
161* Plus 1
162* Plus 2
163* Plus 3
165Pluses loose:
167* Plus 1
168* Plus 2
169* Plus 3
171Minuses tight:
173* Minus 1
174* Minus 2
175* Minus 3
177Minuses loose:
179* Minus 1
180* Minus 2
181* Minus 3
183[[ordered]]
184Ordered
185~~~~~~~
187Tight:
1891. First
1902. Second
1913. Third
193and:
1951. One
1962. Two
1973. Three
199Loose using tabs:
2011. First
2022. Second
2033. Third
205and using spaces:
2071. One
2082. Two
2093. Three
211Multiple paragraphs:
2131. Item 1, graf one.
215Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
2162. Item 2.
2173. Item 3.
219[[nested]]
220Nested
221~~~~~~
223* Tab
224** Tab
225*** Tab
227Here’s another:
2291. First
2302. Second:
231* Fee
232* Fie
233* Foe
2343. Third
236Same thing but with paragraphs:
2381. First
2392. Second:
240* Fee
241* Fie
242* Foe
2433. Third
245[[tabs-and-spaces]]
246Tabs and spaces
247~~~~~~~~~~~~~~~
249* this is a list item indented with tabs
250* this is a list item indented with spaces
251** this is an example list item indented with tabs
252** this is an example list item indented with spaces
254[[fancy-list-markers]]
255Fancy list markers
256~~~~~~~~~~~~~~~~~~
2581. begins with 2
2592. and now 3
261with a continuation
262a. sublist with roman numerals, starting with 4
263b. more items
264A. a subsublist
265B. a subsublist
267Nesting:
269A. Upper Alpha
270A. Upper Roman.
2711. Decimal start with 6
272a. Lower alpha with paren
274Autonumbering:
2761. Autonumber.
2772. More.
2781. Nested.
280Should not be a list item:
282M.A. 2007
284B. Williams
286'''''
288[[definition-lists]]
289Definition Lists
290----------------
292Tight using spaces:
294apple::
295 red fruit
296orange::
297 orange fruit
298banana::
299 yellow fruit
301Tight using tabs:
303apple::
304 red fruit
305orange::
306 orange fruit
307banana::
308 yellow fruit
310Loose:
312apple::
313 red fruit
314orange::
315 orange fruit
316banana::
317 yellow fruit
319Multiple blocks with italics:
321_apple_::
322 red fruit
323 +
324 contains seeds, crisp, pleasant to taste
325_orange_::
326 orange fruit
327 +
328....
329{ orange code block }
330....
331 +
332 __________________
333 orange block quote
334 __________________
336Multiple definitions, tight:
338apple::
339 red fruit
340 +
341 computer
342orange::
343 orange fruit
344 +
345 bank
347Multiple definitions, loose:
349apple::
350 red fruit
351 +
352 computer
353orange::
354 orange fruit
355 +
356 bank
358Blank line after term, indented marker, alternate markers:
360apple::
361 red fruit
362 +
363 computer
364orange::
365 orange fruit
366 +
367 1. sublist
368 2. sublist
370[[html-blocks]]
371HTML Blocks
372-----------
374Simple block on one line:
376foo
378And nested without indentation:
380foo
382bar
384Interpreted markdown in a table:
386This is _emphasized_
388And this is *strong*
390Here’s a simple block:
392foo
394This should be a code block, though:
396....
397<div>
398 foo
399</div>
400....
402As should this:
404....
405<div>foo</div>
406....
408Now, nested:
410foo
412This should just be an HTML comment:
414Multiline:
416Code block:
418....
419<!-- Comment -->
420....
422Just plain comment, with trailing spaces on the line:
424Code:
426....
427<hr />
428....
430Hr’s:
432'''''
434[[inline-markup]]
435Inline Markup
436-------------
438This is _emphasized_, and so _is this_.
440This is *strong*, and so *is this*.
442An _link:/url[emphasized link]_.
444*_This is strong and em._*
446So is *_this_* word.
448*_This is strong and em._*
450So is *_this_* word.
452This is code: `>`, `$`, `\`, `\$`, `<html>`.
454[line-through]*This is _strikeout_.*
456Superscripts: a^bc^d a^_hello_^ a^hello there^.
458Subscripts: H~2~O, H~23~O, H~many of them~O.
460These should not be superscripts or subscripts, because of the unescaped
461spaces: a^b c^d, a~b c~d.
463'''''
465[[smart-quotes-ellipses-dashes]]
466Smart quotes, ellipses, dashes
467------------------------------
469``Hello,'' said the spider. ```Shelob' is my name.''
471`A', `B', and `C' are letters.
473`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
475`He said, ``I want to go.''' Were you alive in the 70’s?
477Here is some quoted ``code`' and a ``http://example.com/?foo=1&bar=2[quoted
478link]''.
480Some dashes: one—two — three—four — five.
482Dashes between numbers: 5–7, 255–66, 1987–1999.
484Ellipses…and…and….
486'''''
488[[latex]]
489LaTeX
490-----
492*
493* latexmath:[$2+2=4$]
494* latexmath:[$x \in y$]
495* latexmath:[$\alpha \wedge \omega$]
496* latexmath:[$223$]
497* latexmath:[$p$]-Tree
498* Here’s some display math:
499latexmath:[\[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]]
500* Here’s one that has a line break in it:
501latexmath:[$\alpha + \omega \times x^2$].
503These shouldn’t be math:
505* To get the famous equation, write `$e = mc^2$`.
506* $22,000 is a _lot_ of money. So is $34,000. (It worked if ``lot'' is
507emphasized.)
508* Shoes ($20) and socks ($5).
509* Escaped `$`: $73 _this should be emphasized_ 23$.
511Here’s a LaTeX table:
513'''''
515[[special-characters]]
516Special Characters
517------------------
519Here is some unicode:
521* I hat: Î
522* o umlaut: ö
523* section: §
524* set membership: ∈
525* copyright: ©
527AT&T has an ampersand in their name.
529AT&T is another way to write it.
531This & that.
5334 < 5.
5356 > 5.
537Backslash: \
539Backtick: `
541Asterisk: *
543Underscore: _
545Left brace: \{
547Right brace: }
549Left bracket: [
551Right bracket: ]
553Left paren: (
555Right paren: )
557Greater-than: >
559Hash: #
561Period: .
563Bang: !
565Plus: +
567Minus: -
569'''''
571[[links]]
572Links
573-----
575[[explicit]]
576Explicit
577~~~~~~~~
579Just a link:/url/[URL].
581link:/url/[URL and title].
583link:/url/[URL and title].
585link:/url/[URL and title].
587link:/url/[URL and title]
589link:/url/[URL and title]
591link:/url/with_underscore[with_underscore]
593mailto:nobody@nowhere.net[Email link]
595link:[Empty].
597[[reference]]
598Reference
599~~~~~~~~~
601Foo link:/url/[bar].
603With link:/url/[embedded [brackets]].
605link:/url/[b] by itself should be a link.
607Indented link:/url[once].
609Indented link:/url[twice].
611Indented link:/url[thrice].
613This should [not][] be a link.
615....
616[not]: /url
617....
619Foo link:/url/[bar].
621Foo link:/url/[biz].
623[[with-ampersands]]
624With ampersands
625~~~~~~~~~~~~~~~
627Here’s a http://example.com/?foo=1&bar=2[link with an ampersand in the URL].
629Here’s a link with an amersand in the link text: http://att.com/[AT&T].
631Here’s an link:/script?foo=1&bar=2[inline link].
633Here’s an link:/script?foo=1&bar=2[inline link in pointy braces].
635[[autolinks]]
636Autolinks
637~~~~~~~~~
639With an ampersand: http://example.com/?foo=1&bar=2
641* In a list?
642* http://example.com/
643* It should.
645An e-mail address: nobody@nowhere.net
647________________________________
648Blockquoted: http://example.com/
649________________________________
651Auto-links should not occur here: `<http://example.com/>`
653....
654or here: <http://example.com/>
655....
657'''''
659[[images]]
660Images
661------
663From ``Voyage dans la Lune'' by Georges Melies (1902):
665image:lalune.jpg[lalune,title="Voyage dans la Lune"]
667Here is a movie image:movie.jpg[movie] icon.
669'''''
671[[footnotes]]
672Footnotes
673---------
675Here is a footnote reference,footnote:[Here is the footnote. It can go
676anywhere after the footnote reference. It need not be placed at the end of the
677document.] and another.[multiblock footnote omitted] This should _not_ be a
678footnote reference, because it contains a space.[^my note] Here is an inline
679note.footnote:[This is _easier_ to type. Inline notes may contain
680http://google.com[links] and `]` verbatim characters, as well as [bracketed
681text].]
683___________________________________________
684Notes can go in quotes.footnote:[In quote.]
685___________________________________________
6871. And in list items.footnote:[In list.]
689This paragraph should not be part of the note, as it is not indented.