git.iko.soy/typeable/pandoc
on 2.4 help sign in
typeable/pandoc/test/writer.asciidoc
627 lines 8.4 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:
691. item one
702. item two
72Nested block quotes:
74______
75nested
76______
78______
79nested
80______
82--
83______________________
85This should not be a block quote: 2 > 1.
87And a following paragraph.
89'''''
91== Code Blocks
93Code:
95....
96---- (should be four hyphens)
98sub status {
99 print "working";
102this code block is indented by one tab
103....
105And:
107....
108 this code block is indented by two tabs
110These should not be escaped: \$ \\ \> \[ \{
111....
113'''''
115== Lists
117=== Unordered
119Asterisks tight:
121* asterisk 1
122* asterisk 2
123* asterisk 3
125Asterisks loose:
127* asterisk 1
128* asterisk 2
129* asterisk 3
131Pluses tight:
133* Plus 1
134* Plus 2
135* Plus 3
137Pluses loose:
139* Plus 1
140* Plus 2
141* Plus 3
143Minuses tight:
145* Minus 1
146* Minus 2
147* Minus 3
149Minuses loose:
151* Minus 1
152* Minus 2
153* Minus 3
155=== Ordered
157Tight:
1591. First
1602. Second
1613. Third
163and:
1651. One
1662. Two
1673. Three
169Loose using tabs:
1711. First
1722. Second
1733. Third
175and using spaces:
1771. One
1782. Two
1793. Three
181Multiple paragraphs:
1831. Item 1, graf one.
185Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
1862. Item 2.
1873. Item 3.
189=== Nested
191* Tab
192** Tab
193*** Tab
195Here’s another:
1971. First
1982. Second:
199* Fee
200* Fie
201* Foe
2023. Third
204Same thing but with paragraphs:
2061. First
2072. Second:
208* Fee
209* Fie
210* Foe
2113. Third
213=== Tabs and spaces
215* this is a list item indented with tabs
216* this is a list item indented with spaces
217** this is an example list item indented with tabs
218** this is an example list item indented with spaces
220=== Fancy list markers
2221. begins with 2
2232. and now 3
225with a continuation
226a. sublist with roman numerals, starting with 4
227b. more items
228A. a subsublist
229B. a subsublist
231Nesting:
233A. Upper Alpha
234A. Upper Roman.
2351. Decimal start with 6
236a. Lower alpha with paren
238Autonumbering:
2401. Autonumber.
2412. More.
2421. Nested.
244Should not be a list item:
246M.A. 2007
248B. Williams
250'''''
252== Definition Lists
254Tight using spaces:
256apple::
257 red fruit
258orange::
259 orange fruit
260banana::
261 yellow fruit
263Tight using tabs:
265apple::
266 red fruit
267orange::
268 orange fruit
269banana::
270 yellow fruit
272Loose:
274apple::
275 red fruit
276orange::
277 orange fruit
278banana::
279 yellow fruit
281Multiple blocks with italics:
283_apple_::
284 red fruit
285 +
286 contains seeds, crisp, pleasant to taste
287_orange_::
288 orange fruit
289 +
290....
291{ orange code block }
292....
293 +
294 __________________
295 orange block quote
296 __________________
298Multiple definitions, tight:
300apple::
301 red fruit
302 +
303 computer
304orange::
305 orange fruit
306 +
307 bank
309Multiple definitions, loose:
311apple::
312 red fruit
313 +
314 computer
315orange::
316 orange fruit
317 +
318 bank
320Blank line after term, indented marker, alternate markers:
322apple::
323 red fruit
324 +
325 computer
326orange::
327 orange fruit
328 +
329 1. sublist
330 2. sublist
332== HTML Blocks
334Simple block on one line:
336foo
338And nested without indentation:
340foo
342bar
344Interpreted markdown in a table:
346This is _emphasized_
348And this is *strong*
350Here’s a simple block:
352foo
354This should be a code block, though:
356....
357<div>
358 foo
359</div>
360....
362As should this:
364....
365<div>foo</div>
366....
368Now, nested:
370foo
372This should just be an HTML comment:
374Multiline:
376Code block:
378....
379<!-- Comment -->
380....
382Just plain comment, with trailing spaces on the line:
384Code:
386....
387<hr />
388....
390Hr’s:
392'''''
394== Inline Markup
396This is _emphasized_, and so _is this_.
398This is *strong*, and so *is this*.
400An _link:/url[emphasized link]_.
402*_This is strong and em._*
404So is *_this_* word.
406*_This is strong and em._*
408So is *_this_* word.
410This is code: `>`, `$`, `\`, `\$`, `<html>`.
412[line-through]*This is _strikeout_.*
414Superscripts: a^bc^d a^_hello_^ a^hello there^.
416Subscripts: H~2~O, H~23~O, H~many of them~O.
418These should not be superscripts or subscripts, because of the unescaped
419spaces: a^b c^d, a~b c~d.
421'''''
423== Smart quotes, ellipses, dashes
425``Hello,'' said the spider. ```Shelob' is my name.''
427`A', `B', and `C' are letters.
429`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
431`He said, ``I want to go.''' Were you alive in the 70’s?
433Here is some quoted ``code`' and a ``http://example.com/?foo=1&bar=2[quoted
434link]''.
436Some dashes: one—two — three—four — five.
438Dashes between numbers: 5–7, 255–66, 1987–1999.
440Ellipses…and…and….
442'''''
444== LaTeX
446*
447* latexmath:[$2+2=4$]
448* latexmath:[$x \in y$]
449* latexmath:[$\alpha \wedge \omega$]
450* latexmath:[$223$]
451* latexmath:[$p$]-Tree
452* Here’s some display math:
453latexmath:[\[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]]
454* Here’s one that has a line break in it:
455latexmath:[$\alpha + \omega \times x^2$].
457These shouldn’t be math:
459* To get the famous equation, write `$e = mc^2$`.
460* $22,000 is a _lot_ of money. So is $34,000. (It worked if ``lot'' is
461emphasized.)
462* Shoes ($20) and socks ($5).
463* Escaped `$`: $73 _this should be emphasized_ 23$.
465Here’s a LaTeX table:
467'''''
469== Special Characters
471Here is some unicode:
473* I hat: Î
474* o umlaut: ö
475* section: §
476* set membership: ∈
477* copyright: ©
479AT&T has an ampersand in their name.
481AT&T is another way to write it.
483This & that.
4854 < 5.
4876 > 5.
489Backslash: \
491Backtick: `
493Asterisk: *
495Underscore: _
497Left brace: \{
499Right brace: }
501Left bracket: [
503Right bracket: ]
505Left paren: (
507Right paren: )
509Greater-than: >
511Hash: #
513Period: .
515Bang: !
517Plus: +
519Minus: -
521'''''
523== Links
525=== Explicit
527Just a link:/url/[URL].
529link:/url/[URL and title].
531link:/url/[URL and title].
533link:/url/[URL and title].
535link:/url/[URL and title]
537link:/url/[URL and title]
539link:/url/with_underscore[with_underscore]
541mailto:nobody@nowhere.net[Email link]
543link:[Empty].
545=== Reference
547Foo link:/url/[bar].
549With link:/url/[embedded [brackets]].
551link:/url/[b] by itself should be a link.
553Indented link:/url[once].
555Indented link:/url[twice].
557Indented link:/url[thrice].
559This should [not][] be a link.
561....
562[not]: /url
563....
565Foo link:/url/[bar].
567Foo link:/url/[biz].
569=== With ampersands
571Here’s a http://example.com/?foo=1&bar=2[link with an ampersand in the URL].
573Here’s a link with an amersand in the link text: http://att.com/[AT&T].
575Here’s an link:/script?foo=1&bar=2[inline link].
577Here’s an link:/script?foo=1&bar=2[inline link in pointy braces].
579=== Autolinks
581With an ampersand: http://example.com/?foo=1&bar=2
583* In a list?
584* http://example.com/
585* It should.
587An e-mail address: nobody@nowhere.net
589________________________________
590Blockquoted: http://example.com/
591________________________________
593Auto-links should not occur here: `<http://example.com/>`
595....
596or here: <http://example.com/>
597....
599'''''
601== Images
603From ``Voyage dans la Lune'' by Georges Melies (1902):
605image:lalune.jpg[lalune,title="Voyage dans la Lune"]
607Here is a movie image:movie.jpg[movie] icon.
609'''''
611== Footnotes
613Here is a footnote reference,footnote:[Here is the footnote. It can go
614anywhere after the footnote reference. It need not be placed at the end of the
615document.] and another.[multiblock footnote omitted] This should _not_ be a
616footnote reference, because it contains a space.[^my note] Here is an inline
617note.footnote:[This is _easier_ to type. Inline notes may contain
618http://google.com[links] and `]` verbatim characters, as well as [bracketed
619text].]
621___________________________________________
622Notes can go in quotes.footnote:[In quote.]
623___________________________________________
6251. And in list items.footnote:[In list.]
627This paragraph should not be part of the note, as it is not indented.