git.iko.soy/typeable/pandoc
on 2.2.3 help sign in
typeable/pandoc/test/writer.asciidoc
658 lines 8.7 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'''''
11Headers
12-------
14Level 2 with an link:/url[embedded link]
15~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17Level 3 with _emphasis_
18^^^^^^^^^^^^^^^^^^^^^^^
20Level 4
21+++++++
23Level 5
25Level 1
26-------
28Level 2 with _emphasis_
29~~~~~~~~~~~~~~~~~~~~~~~
31Level 3
32^^^^^^^
34with no blank line
36Level 2
37~~~~~~~
39with no blank line
41'''''
43Paragraphs
44----------
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'''''
59Block Quotes
60------------
62E-mail style:
64__________________________________________
65This is a block quote. It is pretty short.
66__________________________________________
68______________________
69--
70Code in a block quote:
72....
73sub status {
74 print "working";
76....
78A list:
801. item one
812. item two
83Nested block quotes:
85______
86nested
87______
89______
90nested
91______
93--
94______________________
96This should not be a block quote: 2 > 1.
98And a following paragraph.
100'''''
102Code Blocks
103-----------
105Code:
107....
108---- (should be four hyphens)
110sub status {
111 print "working";
114this code block is indented by one tab
115....
117And:
119....
120 this code block is indented by two tabs
122These should not be escaped: \$ \\ \> \[ \{
123....
125'''''
127Lists
128-----
130Unordered
131~~~~~~~~~
133Asterisks tight:
135* asterisk 1
136* asterisk 2
137* asterisk 3
139Asterisks loose:
141* asterisk 1
142* asterisk 2
143* asterisk 3
145Pluses tight:
147* Plus 1
148* Plus 2
149* Plus 3
151Pluses loose:
153* Plus 1
154* Plus 2
155* Plus 3
157Minuses tight:
159* Minus 1
160* Minus 2
161* Minus 3
163Minuses loose:
165* Minus 1
166* Minus 2
167* Minus 3
169Ordered
170~~~~~~~
172Tight:
1741. First
1752. Second
1763. Third
178and:
1801. One
1812. Two
1823. Three
184Loose using tabs:
1861. First
1872. Second
1883. Third
190and using spaces:
1921. One
1932. Two
1943. Three
196Multiple paragraphs:
1981. Item 1, graf one.
200Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
2012. Item 2.
2023. Item 3.
204Nested
205~~~~~~
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
2232. Second:
224* Fee
225* Fie
226* Foe
2273. Third
229Tabs and spaces
230~~~~~~~~~~~~~~~
232* this is a list item indented with tabs
233* this is a list item indented with spaces
234** this is an example list item indented with tabs
235** this is an example list item indented with spaces
237Fancy list markers
238~~~~~~~~~~~~~~~~~~
2401. begins with 2
2412. and now 3
243with a continuation
244a. sublist with roman numerals, starting with 4
245b. more items
246A. a subsublist
247B. a subsublist
249Nesting:
251A. Upper Alpha
252A. Upper Roman.
2531. Decimal start with 6
254a. Lower alpha with paren
256Autonumbering:
2581. Autonumber.
2592. More.
2601. Nested.
262Should not be a list item:
264M.A. 2007
266B. Williams
268'''''
270Definition Lists
271----------------
273Tight using spaces:
275apple::
276 red fruit
277orange::
278 orange fruit
279banana::
280 yellow fruit
282Tight using tabs:
284apple::
285 red fruit
286orange::
287 orange fruit
288banana::
289 yellow fruit
291Loose:
293apple::
294 red fruit
295orange::
296 orange fruit
297banana::
298 yellow fruit
300Multiple blocks with italics:
302_apple_::
303 red fruit
304 +
305 contains seeds, crisp, pleasant to taste
306_orange_::
307 orange fruit
308 +
309....
310{ orange code block }
311....
312 +
313 __________________
314 orange block quote
315 __________________
317Multiple definitions, tight:
319apple::
320 red fruit
321 +
322 computer
323orange::
324 orange fruit
325 +
326 bank
328Multiple definitions, loose:
330apple::
331 red fruit
332 +
333 computer
334orange::
335 orange fruit
336 +
337 bank
339Blank line after term, indented marker, alternate markers:
341apple::
342 red fruit
343 +
344 computer
345orange::
346 orange fruit
347 +
348 1. sublist
349 2. sublist
351HTML Blocks
352-----------
354Simple block on one line:
356foo
358And nested without indentation:
360foo
362bar
364Interpreted markdown in a table:
366This is _emphasized_
368And this is *strong*
370Here’s a simple block:
372foo
374This should be a code block, though:
376....
377<div>
378 foo
379</div>
380....
382As should this:
384....
385<div>foo</div>
386....
388Now, nested:
390foo
392This should just be an HTML comment:
394Multiline:
396Code block:
398....
399<!-- Comment -->
400....
402Just plain comment, with trailing spaces on the line:
404Code:
406....
407<hr />
408....
410Hr’s:
412'''''
414Inline Markup
415-------------
417This is _emphasized_, and so _is this_.
419This is *strong*, and so *is this*.
421An _link:/url[emphasized link]_.
423*_This is strong and em._*
425So is *_this_* word.
427*_This is strong and em._*
429So is *_this_* word.
431This is code: `>`, `$`, `\`, `\$`, `<html>`.
433[line-through]*This is _strikeout_.*
435Superscripts: a^bc^d a^_hello_^ a^hello there^.
437Subscripts: H~2~O, H~23~O, H~many of them~O.
439These should not be superscripts or subscripts, because of the unescaped
440spaces: a^b c^d, a~b c~d.
442'''''
444Smart quotes, ellipses, dashes
445------------------------------
447``Hello,'' said the spider. ```Shelob' is my name.''
449`A', `B', and `C' are letters.
451`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
453`He said, ``I want to go.''' Were you alive in the 70’s?
455Here is some quoted ``code`' and a ``http://example.com/?foo=1&bar=2[quoted
456link]''.
458Some dashes: one—two — three—four — five.
460Dashes between numbers: 5–7, 255–66, 1987–1999.
462Ellipses…and…and….
464'''''
466LaTeX
467-----
469*
470* latexmath:[$2+2=4$]
471* latexmath:[$x \in y$]
472* latexmath:[$\alpha \wedge \omega$]
473* latexmath:[$223$]
474* latexmath:[$p$]-Tree
475* Here’s some display math:
476latexmath:[\[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]]
477* Here’s one that has a line break in it:
478latexmath:[$\alpha + \omega \times x^2$].
480These shouldn’t be math:
482* To get the famous equation, write `$e = mc^2$`.
483* $22,000 is a _lot_ of money. So is $34,000. (It worked if ``lot'' is
484emphasized.)
485* Shoes ($20) and socks ($5).
486* Escaped `$`: $73 _this should be emphasized_ 23$.
488Here’s a LaTeX table:
490'''''
492Special Characters
493------------------
495Here is some unicode:
497* I hat: Î
498* o umlaut: ö
499* section: §
500* set membership: ∈
501* copyright: ©
503AT&T has an ampersand in their name.
505AT&T is another way to write it.
507This & that.
5094 < 5.
5116 > 5.
513Backslash: \
515Backtick: `
517Asterisk: *
519Underscore: _
521Left brace: \{
523Right brace: }
525Left bracket: [
527Right bracket: ]
529Left paren: (
531Right paren: )
533Greater-than: >
535Hash: #
537Period: .
539Bang: !
541Plus: +
543Minus: -
545'''''
547Links
548-----
550Explicit
551~~~~~~~~
553Just a link:/url/[URL].
555link:/url/[URL and title].
557link:/url/[URL and title].
559link:/url/[URL and title].
561link:/url/[URL and title]
563link:/url/[URL and title]
565link:/url/with_underscore[with_underscore]
567mailto:nobody@nowhere.net[Email link]
569link:[Empty].
571Reference
572~~~~~~~~~
574Foo link:/url/[bar].
576With link:/url/[embedded [brackets]].
578link:/url/[b] by itself should be a link.
580Indented link:/url[once].
582Indented link:/url[twice].
584Indented link:/url[thrice].
586This should [not][] be a link.
588....
589[not]: /url
590....
592Foo link:/url/[bar].
594Foo link:/url/[biz].
596With ampersands
597~~~~~~~~~~~~~~~
599Here’s a http://example.com/?foo=1&bar=2[link with an ampersand in the URL].
601Here’s a link with an amersand in the link text: http://att.com/[AT&T].
603Here’s an link:/script?foo=1&bar=2[inline link].
605Here’s an link:/script?foo=1&bar=2[inline link in pointy braces].
607Autolinks
608~~~~~~~~~
610With an ampersand: http://example.com/?foo=1&bar=2
612* In a list?
613* http://example.com/
614* It should.
616An e-mail address: nobody@nowhere.net
618________________________________
619Blockquoted: http://example.com/
620________________________________
622Auto-links should not occur here: `<http://example.com/>`
624....
625or here: <http://example.com/>
626....
628'''''
630Images
631------
633From ``Voyage dans la Lune'' by Georges Melies (1902):
635image:lalune.jpg[lalune,title="Voyage dans la Lune"]
637Here is a movie image:movie.jpg[movie] icon.
639'''''
641Footnotes
642---------
644Here is a footnote reference,footnote:[Here is the footnote. It can go
645anywhere after the footnote reference. It need not be placed at the end of the
646document.] and another.[multiblock footnote omitted] This should _not_ be a
647footnote reference, because it contains a space.[^my note] Here is an inline
648note.footnote:[This is _easier_ to type. Inline notes may contain
649http://google.com[links] and `]` verbatim characters, as well as [bracketed
650text].]
652___________________________________________
653Notes can go in quotes.footnote:[In quote.]
654___________________________________________
6561. And in list items.footnote:[In list.]
658This paragraph should not be part of the note, as it is not indented.