git.iko.soy/typeable/pandoc
on 1.14.0.4 help sign in
typeable/pandoc/tests/writer.asciidoc
694 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
379And nested without indentation:
381foo
383bar
385Interpreted markdown in a table:
387This is _emphasized_
389And this is *strong*
391Here’s a simple block:
393foo
395This should be a code block, though:
397-------
398<div>
399 foo
400</div>
401-------
403As should this:
405--------------
406<div>foo</div>
407--------------
409Now, nested:
411foo
413This should just be an HTML comment:
415Multiline:
417Code block:
419----------------
420<!-- Comment -->
421----------------
423Just plain comment, with trailing spaces on the line:
425Code:
427------
428<hr />
429------
431Hr’s:
433'''''
435[[inline-markup]]
436Inline Markup
437-------------
439This is __emphasized__, and so __is this__.
441This is **strong**, and so **is this**.
443An __link:/url[emphasized link]__.
445*_This is strong and em._*
447So is *_this_* word.
449*_This is strong and em._*
451So is *_this_* word.
453This is code: `>`, `$`, `\`, `\$`, `<html>`.
455[line-through]*This is __strikeout__.*
457Superscripts: a^bc^d a^_hello_^ a^hello there^.
459Subscripts: H~2~O, H~23~O, H~many of them~O.
461These should not be superscripts or subscripts, because of the unescaped
462spaces: a^b c^d, a~b c~d.
464'''''
466[[smart-quotes-ellipses-dashes]]
467Smart quotes, ellipses, dashes
468------------------------------
470``Hello,'' said the spider. ```Shelob' is my name.''
472`A', `B', and `C' are letters.
474`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
476`He said, ``I want to go.''' Were you alive in the 70’s?
478Here is some quoted ``code`' and a ``http://example.com/?foo=1&bar=2[quoted
479link]''.
481Some dashes: one—two — three—four — five.
483Dashes between numbers: 5–7, 255–66, 1987–1999.
485Ellipses…and…and….
487'''''
489[[latex]]
490LaTeX
491-----
493*
494* latexmath:[$2+2=4$]
495* latexmath:[$x \in y$]
496* latexmath:[$\alpha \wedge \omega$]
497* latexmath:[$223$]
498* latexmath:[$p$]-Tree
499* Here’s some display math:
500latexmath:[\[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]]
501* Here’s one that has a line break in it:
502latexmath:[$\alpha + \omega \times x^2$].
504These shouldn’t be math:
506* To get the famous equation, write `$e = mc^2$`.
507* $22,000 is a _lot_ of money. So is $34,000. (It worked if ``lot'' is
508emphasized.)
509* Shoes ($20) and socks ($5).
510* Escaped `$`: $73 _this should be emphasized_ 23$.
512Here’s a LaTeX table:
514'''''
516[[special-characters]]
517Special Characters
518------------------
520Here is some unicode:
522* I hat: Î
523* o umlaut: ö
524* section: §
525* set membership: ∈
526* copyright: ©
528AT&T has an ampersand in their name.
530AT&T is another way to write it.
532This & that.
5344 < 5.
5366 > 5.
538Backslash: \
540Backtick: `
542Asterisk: *
544Underscore: _
546Left brace: \{
548Right brace: }
550Left bracket: [
552Right bracket: ]
554Left paren: (
556Right paren: )
558Greater-than: >
560Hash: #
562Period: .
564Bang: !
566Plus: +
568Minus: -
570'''''
572[[links]]
573Links
574-----
576[[explicit]]
577Explicit
578~~~~~~~~
580Just a link:/url/[URL].
582link:/url/[URL and title].
584link:/url/[URL and title].
586link:/url/[URL and title].
588link:/url/[URL and title]
590link:/url/[URL and title]
592link:/url/with_underscore[with_underscore]
594mailto:nobody@nowhere.net[Email link]
596link:[Empty].
598[[reference]]
599Reference
600~~~~~~~~~
602Foo link:/url/[bar].
604Foo link:/url/[bar].
606Foo link:/url/[bar].
608With link:/url/[embedded [brackets]].
610link:/url/[b] by itself should be a link.
612Indented link:/url[once].
614Indented link:/url[twice].
616Indented link:/url[thrice].
618This should [not][] be a link.
620-----------
621[not]: /url
622-----------
624Foo link:/url/[bar].
626Foo link:/url/[biz].
628[[with-ampersands]]
629With ampersands
630~~~~~~~~~~~~~~~
632Here’s a http://example.com/?foo=1&bar=2[link with an ampersand in the URL].
634Here’s a link with an amersand in the link text: http://att.com/[AT&T].
636Here’s an link:/script?foo=1&bar=2[inline link].
638Here’s an link:/script?foo=1&bar=2[inline link in pointy braces].
640[[autolinks]]
641Autolinks
642~~~~~~~~~
644With an ampersand: http://example.com/?foo=1&bar=2
646* In a list?
647* http://example.com/
648* It should.
650An e-mail address: nobody@nowhere.net
652________________________________
653Blockquoted: http://example.com/
654________________________________
656Auto-links should not occur here: `<http://example.com/>`
658------------------------------
659or here: <http://example.com/>
660------------------------------
662'''''
664[[images]]
665Images
666------
668From ``Voyage dans la Lune'' by Georges Melies (1902):
670image:lalune.jpg[lalune,title="Voyage dans la Lune"]
672Here is a movie image:movie.jpg[movie] icon.
674'''''
676[[footnotes]]
677Footnotes
678---------
680Here is a footnote reference,footnote:[Here is the footnote. It can go
681anywhere after the footnote reference. It need not be placed at the end of the
682document.] and another.[multiblock footnote omitted] This should _not_ be a
683footnote reference, because it contains a space.[^my note] Here is an inline
684note.footnote:[This is _easier_ to type. Inline notes may contain
685http://google.com[links] and `]` verbatim characters, as well as [bracketed
686text].]
688___________________________________________
689Notes can go in quotes.footnote:[In quote.]
690___________________________________________
6921. And in list items.footnote:[In list.]
694This paragraph should not be part of the note, as it is not indented.