git.iko.soy/typeable/pandoc
on 1.12 help sign in
typeable/pandoc/tests/writer.asciidoc
687 lines 9.6 kB history raw
1Pandoc Test Suite
2=================
3:author: John MacFarlane
4:author: Anonymous
5:date: July 17, 2006
7This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
8markdown test suite.
10'''''
12[[headers]]
13Headers
14-------
16[[level-2-with-an-embedded-link]]
17Level 2 with an link:/url[embedded link]
18~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20[[level-3-with-emphasis]]
21Level 3 with _emphasis_
22^^^^^^^^^^^^^^^^^^^^^^^
24[[level-4]]
25Level 4
26+++++++
28[[level-5]]
29Level 5
31[[level-1]]
32Level 1
33-------
35[[level-2-with-emphasis]]
36Level 2 with _emphasis_
37~~~~~~~~~~~~~~~~~~~~~~~
39[[level-3]]
40Level 3
41^^^^^^^
43with no blank line
45[[level-2]]
46Level 2
47~~~~~~~
49with no blank line
51'''''
53[[paragraphs]]
54Paragraphs
55----------
57Here’s a regular paragraph.
59In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
60Because a hard-wrapped line in the middle of a paragraph looked like a list
61item.
63Here’s one with a bullet. * criminey.
65There should be a hard line break +
66here.
68'''''
70[[block-quotes]]
71Block Quotes
72------------
74E-mail style:
76__________________________________________
77This is a block quote. It is pretty short.
78__________________________________________
80______________________
81--
82Code in a block quote:
84--------------------
85sub status {
86 print "working";
88--------------------
90A list:
921. item one
932. item two
95Nested block quotes:
97______
98nested
99______
101______
102nested
103______
105--
106______________________
108This should not be a block quote: 2 > 1.
110And a following paragraph.
112'''''
114[[code-blocks]]
115Code Blocks
116-----------
118Code:
120--------------------------------------
121---- (should be four hyphens)
123sub status {
124 print "working";
127this code block is indented by one tab
128--------------------------------------
130And:
132--------------------------------------------
133 this code block is indented by two tabs
135These should not be escaped: \$ \\ \> \[ \{
136--------------------------------------------
138'''''
140[[lists]]
141Lists
142-----
144[[unordered]]
145Unordered
146~~~~~~~~~
148Asterisks tight:
150* asterisk 1
151* asterisk 2
152* asterisk 3
154Asterisks loose:
156* asterisk 1
157* asterisk 2
158* asterisk 3
160Pluses tight:
162* Plus 1
163* Plus 2
164* Plus 3
166Pluses loose:
168* Plus 1
169* Plus 2
170* Plus 3
172Minuses tight:
174* Minus 1
175* Minus 2
176* Minus 3
178Minuses loose:
180* Minus 1
181* Minus 2
182* Minus 3
184[[ordered]]
185Ordered
186~~~~~~~
188Tight:
1901. First
1912. Second
1923. Third
194and:
1961. One
1972. Two
1983. Three
200Loose using tabs:
2021. First
2032. Second
2043. Third
206and using spaces:
2081. One
2092. Two
2103. Three
212Multiple paragraphs:
2141. Item 1, graf one.
216Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
2172. Item 2.
2183. Item 3.
220[[nested]]
221Nested
222~~~~~~
224* Tab
225** Tab
226*** Tab
228Here’s another:
2301. First
2312. Second:
232* Fee
233* Fie
234* Foe
2353. Third
237Same thing but with paragraphs:
2391. First
2402. Second:
241* Fee
242* Fie
243* Foe
2443. Third
246[[tabs-and-spaces]]
247Tabs and spaces
248~~~~~~~~~~~~~~~
250* this is a list item indented with tabs
251* this is a list item indented with spaces
252** this is an example list item indented with tabs
253** this is an example list item indented with spaces
255[[fancy-list-markers]]
256Fancy list markers
257~~~~~~~~~~~~~~~~~~
2591. begins with 2
2602. and now 3
262with a continuation
263a. sublist with roman numerals, starting with 4
264b. more items
265A. a subsublist
266B. a subsublist
268Nesting:
270A. Upper Alpha
271A. Upper Roman.
2721. Decimal start with 6
273a. Lower alpha with paren
275Autonumbering:
2771. Autonumber.
2782. More.
2791. Nested.
281Should not be a list item:
283M.A. 2007
285B. Williams
287'''''
289[[definition-lists]]
290Definition Lists
291----------------
293Tight using spaces:
295apple::
296 red fruit
297orange::
298 orange fruit
299banana::
300 yellow fruit
302Tight using tabs:
304apple::
305 red fruit
306orange::
307 orange fruit
308banana::
309 yellow fruit
311Loose:
313apple::
314 red fruit
315orange::
316 orange fruit
317banana::
318 yellow fruit
320Multiple blocks with italics:
322_apple_::
323 red fruit
324 +
325 contains seeds, crisp, pleasant to taste
326_orange_::
327 orange fruit
328 +
329---------------------
330{ orange code block }
331---------------------
332 +
333 __________________
334 orange block quote
335 __________________
337Multiple definitions, tight:
339apple::
340 red fruit
341 +
342 computer
343orange::
344 orange fruit
345 +
346 bank
348Multiple definitions, loose:
350apple::
351 red fruit
352 +
353 computer
354orange::
355 orange fruit
356 +
357 bank
359Blank line after term, indented marker, alternate markers:
361apple::
362 red fruit
363 +
364 computer
365orange::
366 orange fruit
367 +
368 1. sublist
369 2. sublist
371[[html-blocks]]
372HTML Blocks
373-----------
375Simple block on one line:
377foo
378And nested without indentation:
380foo
381bar
382Interpreted markdown in a table:
384This is _emphasized_
385And this is *strong*
386Here’s a simple block:
388foo
389This should be a code block, though:
391-------
392<div>
393 foo
394</div>
395-------
397As should this:
399--------------
400<div>foo</div>
401--------------
403Now, nested:
405foo
406This should just be an HTML comment:
408Multiline:
410Code block:
412----------------
413<!-- Comment -->
414----------------
416Just plain comment, with trailing spaces on the line:
418Code:
420------
421<hr />
422------
424Hr’s:
426'''''
428[[inline-markup]]
429Inline Markup
430-------------
432This is _emphasized_, and so _is this_.
434This is *strong*, and so *is this*.
436An _link:/url[emphasized link]_.
438*_This is strong and em._*
440So is *_this_* word.
442*_This is strong and em._*
444So is *_this_* word.
446This is code: `>`, `$`, `\`, `\$`, `<html>`.
448[line-through]*This is _strikeout_.*
450Superscripts: a^bc^d a^_hello_^ a^hello there^.
452Subscripts: H~2~O, H~23~O, H~many of them~O.
454These should not be superscripts or subscripts, because of the unescaped
455spaces: a^b c^d, a~b c~d.
457'''''
459[[smart-quotes-ellipses-dashes]]
460Smart quotes, ellipses, dashes
461------------------------------
463``Hello,'' said the spider. ```Shelob' is my name.''
465`A', `B', and `C' are letters.
467`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
469`He said, ``I want to go.''' Were you alive in the 70’s?
471Here is some quoted ``code`' and a ``http://example.com/?foo=1&bar=2[quoted
472link]''.
474Some dashes: one—two — three—four — five.
476Dashes between numbers: 5–7, 255–66, 1987–1999.
478Ellipses…and…and….
480'''''
482[[latex]]
483LaTeX
484-----
487* latexmath:[$2+2=4$]
488* latexmath:[$x \in y$]
489* latexmath:[$\alpha \wedge \omega$]
490* latexmath:[$223$]
491* latexmath:[$p$]-Tree
492* Here’s some display math:
493latexmath:[\[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]]
494* Here’s one that has a line break in it:
495latexmath:[$\alpha + \omega \times x^2$].
497These shouldn’t be math:
499* To get the famous equation, write `$e = mc^2$`.
500* $22,000 is a _lot_ of money. So is $34,000. (It worked if ``lot'' is
501emphasized.)
502* Shoes ($20) and socks ($5).
503* Escaped `$`: $73 _this should be emphasized_ 23$.
505Here’s a LaTeX table:
507'''''
509[[special-characters]]
510Special Characters
511------------------
513Here is some unicode:
515* I hat: Î
516* o umlaut: ö
517* section: §
518* set membership: ∈
519* copyright: ©
521AT&T has an ampersand in their name.
523AT&T is another way to write it.
525This & that.
5274 < 5.
5296 > 5.
531Backslash: \
533Backtick: `
535Asterisk: *
537Underscore: _
539Left brace: \{
541Right brace: }
543Left bracket: [
545Right bracket: ]
547Left paren: (
549Right paren: )
551Greater-than: >
553Hash: #
555Period: .
557Bang: !
559Plus: +
561Minus: -
563'''''
565[[links]]
566Links
567-----
569[[explicit]]
570Explicit
571~~~~~~~~
573Just a link:/url/[URL].
575link:/url/[URL and title].
577link:/url/[URL and title].
579link:/url/[URL and title].
581link:/url/[URL and title]
583link:/url/[URL and title]
585link:/url/with_underscore[with_underscore]
587mailto:nobody@nowhere.net[Email link]
589link:[Empty].
591[[reference]]
592Reference
593~~~~~~~~~
595Foo link:/url/[bar].
597Foo link:/url/[bar].
599Foo link:/url/[bar].
601With link:/url/[embedded [brackets]].
603link:/url/[b] by itself should be a link.
605Indented link:/url[once].
607Indented link:/url[twice].
609Indented link:/url[thrice].
611This should [not][] be a link.
613-----------
614[not]: /url
615-----------
617Foo link:/url/[bar].
619Foo link:/url/[biz].
621[[with-ampersands]]
622With ampersands
623~~~~~~~~~~~~~~~
625Here’s a http://example.com/?foo=1&bar=2[link with an ampersand in the URL].
627Here’s a link with an amersand in the link text: http://att.com/[AT&T].
629Here’s an link:/script?foo=1&bar=2[inline link].
631Here’s an link:/script?foo=1&bar=2[inline link in pointy braces].
633[[autolinks]]
634Autolinks
635~~~~~~~~~
637With an ampersand: http://example.com/?foo=1&bar=2
639* In a list?
640* http://example.com/
641* It should.
643An e-mail address: nobody@nowhere.net
645________________________________
646Blockquoted: http://example.com/
647________________________________
649Auto-links should not occur here: `<http://example.com/>`
651------------------------------
652or here: <http://example.com/>
653------------------------------
655'''''
657[[images]]
658Images
659------
661From ``Voyage dans la Lune'' by Georges Melies (1902):
663image:lalune.jpg[lalune,title="Voyage dans la Lune"]
665Here is a movie image:movie.jpg[movie] icon.
667'''''
669[[footnotes]]
670Footnotes
671---------
673Here is a footnote reference,footnote:[Here is the footnote. It can go
674anywhere after the footnote reference. It need not be placed at the end of the
675document.] and another.[multiblock footnote omitted] This should _not_ be a
676footnote reference, because it contains a space.[^my note] Here is an inline
677note.footnote:[This is _easier_ to type. Inline notes may contain
678http://google.com[links] and `]` verbatim characters, as well as [bracketed
679text].]
681___________________________________________
682Notes can go in quotes.footnote:[In quote.]
683___________________________________________
6851. And in list items.footnote:[In list.]
687This paragraph should not be part of the note, as it is not indented.