git.iko.soy/typeable/pandoc
on rc/test4 help sign in
typeable/pandoc/test/writer.xwiki
650 lines 9.8 kB history raw
1This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite.
4----
6= Headers {{id name="headers" /}}=
8== Level 2 with an [[embedded link>>/url]] {{id name="level-2-with-an-embedded-link" /}}==
10=== Level 3 with //emphasis// {{id name="level-3-with-emphasis" /}}===
12==== Level 4 {{id name="level-4" /}}====
14===== Level 5 {{id name="level-5" /}}=====
16= Level 1 {{id name="level-1" /}}=
18== Level 2 with //emphasis// {{id name="level-2-with-emphasis" /}}==
20=== Level 3 {{id name="level-3" /}}===
22with no blank line
24== Level 2 {{id name="level-2" /}}==
26with no blank line
29----
31= Paragraphs {{id name="paragraphs" /}}=
33Here’s a regular paragraph.
35In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.
37Here’s one with a bullet. * criminey.
39There should be a hard line break\\here.
42----
44= Block Quotes {{id name="block-quotes" /}}=
46E-mail style:
48>This is a block quote. It is pretty short.
50>Code in a block quote:
53>{{code}}
54>sub status {
55> print "working";
56>}
57>{{/code}}
59>A list:
61>1. item one
62>1. item two
64>Nested block quotes:
66>>nested
67>>
68>>nested
69>>
70This should not be a block quote: 2 > 1.
72And a following paragraph.
75----
77= Code Blocks {{id name="code-blocks" /}}=
79Code:
82{{code}}
83---- (should be four hyphens)
85sub status {
86 print "working";
89this code block is indented by one tab
90{{/code}}
92And:
95{{code}}
96 this code block is indented by two tabs
98These should not be escaped: \$ \\ \> \[ \{
99{{/code}}
102----
104= Lists {{id name="lists" /}}=
106== Unordered {{id name="unordered" /}}==
108Asterisks tight:
110*. asterisk 1
111*. asterisk 2
112*. asterisk 3
114Asterisks loose:
116*. asterisk 1
117*. asterisk 2
118*. asterisk 3
120Pluses tight:
122*. Plus 1
123*. Plus 2
124*. Plus 3
126Pluses loose:
128*. Plus 1
129*. Plus 2
130*. Plus 3
132Minuses tight:
134*. Minus 1
135*. Minus 2
136*. Minus 3
138Minuses loose:
140*. Minus 1
141*. Minus 2
142*. Minus 3
144== Ordered {{id name="ordered" /}}==
146Tight:
1481. First
1491. Second
1501. Third
152and:
1541. One
1551. Two
1561. Three
158Loose using tabs:
1601. First
1611. Second
1621. Third
164and using spaces:
1661. One
1671. Two
1681. Three
170Multiple paragraphs:
1721. Item 1, graf one.
174Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
1751. Item 2.
1761. Item 3.
178== Nested {{id name="nested" /}}==
180*. Tab
181**. Tab
182***. Tab
184Here’s another:
1861. First
1871. Second:
1881*. Fee
1891*. Fie
1901*. Foe
1911. Third
193Same thing but with paragraphs:
1951. First
1961. Second:
1981*. Fee
1991*. Fie
2001*. Foe
2011. Third
203== Tabs and spaces {{id name="tabs-and-spaces" /}}==
205*. this is a list item indented with tabs
206*. this is a list item indented with spaces
208**. this is an example list item indented with tabs
209**. this is an example list item indented with spaces
211== Fancy list markers {{id name="fancy-list-markers" /}}==
2131. begins with 2
2141. and now 3
216with a continuation
21811. sublist with roman numerals, starting with 4
21911. more items
220111. a subsublist
221111. a subsublist
223Nesting:
2251. Upper Alpha
22611. Upper Roman.
227111. Decimal start with 6
2281111. Lower alpha with paren
230Autonumbering:
2321. Autonumber.
2331. More.
23411. Nested.
236Should not be a list item:
238M.A. 2007
240B. Williams
243----
245= Definition Lists {{id name="definition-lists" /}}=
247Tight using spaces:
249; apple
250: red fruit
251; orange
252: orange fruit
253; banana
254: yellow fruit
256Tight using tabs:
258; apple
259: red fruit
260; orange
261: orange fruit
262; banana
263: yellow fruit
265Loose:
267; apple
268: red fruit
270; orange
271: orange fruit
273; banana
274: yellow fruit
277Multiple blocks with italics:
279; //apple//
280: red fruit
282contains seeds, crisp, pleasant to taste
284; //orange//
285: orange fruit
288{{code}}
289{ orange code block }
290{{/code}}
292>orange block quote
295Multiple definitions, tight:
297; apple
298: red fruit
299: computer
300; orange
301: orange fruit
302: bank
304Multiple definitions, loose:
306; apple
307: red fruit
309: computer
311; orange
312: orange fruit
314: bank
317Blank line after term, indented marker, alternate markers:
319; apple
320: red fruit
322: computer
324; orange
325: orange fruit
327;1. sublist
328;1. sublist
330= HTML Blocks {{id name="html-blocks" /}}=
332Simple block on one line:
334foo
335And nested without indentation:
337foo
339bar
340Interpreted markdown in a table:
345This is //emphasized//
348And this is **strong**
353Here’s a simple block:
355foo
357This should be a code block, though:
360{{code}}
361<div>
362 foo
363</div>
364{{/code}}
366As should this:
369{{code}}
370<div>foo</div>
371{{/code}}
373Now, nested:
375foo
376This should just be an HTML comment:
379Multiline:
383Code block:
386{{code}}
387<!-- Comment -->
388{{/code}}
390Just plain comment, with trailing spaces on the line:
393Code:
396{{code}}
397<hr />
398{{/code}}
400Hr’s:
412----
414= Inline Markup {{id name="inline-markup" /}}=
416This is //emphasized//, and so //is this//.
418This is **strong**, and so **is this**.
420An //[[emphasized link>>/url]]//.
422**//This is strong and em.//**
424So is **//this//** word.
426**//This is strong and em.//**
428So is **//this//** word.
430This is code: {{code}}>{{/code}}, {{code}}${{/code}}, {{code}}\{{/code}}, {{code}}\${{/code}}, {{code}}<html>{{/code}}.
432--This is //strikeout//.--
434Superscripts: a^^bc^^d a^^//hello//^^ a^^hello there^^.
436Subscripts: H,,2,,O, H,,23,,O, H,,many of them,,O.
438These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~~b c~~d.
441----
443= Smart quotes, ellipses, dashes {{id name="smart-quotes-ellipses-dashes" /}}=
445“Hello,” said the spider. “‘Shelob’ is my name.”
447‘A’, ‘B’, and ‘C’ are letters.
449‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
451‘He said, “I want to go.”’ Were you alive in the 70’s?
453Here is some quoted ‘{{code}}code{{/code}}’ and a “[[quoted link>>http://example.com/?foo=1&bar=2]]”.
455Some dashes: one—two — three—four — five.
457Dashes between numbers: 5–7, 255–66, 1987–1999.
459Ellipses…and…and….
462----
464= LaTeX {{id name="latex" /}}=
466*.
467*. {{formula}}2+2=4{{/formula}}
468*. {{formula}}x \in y{{/formula}}
469*. {{formula}}\alpha \wedge \omega{{/formula}}
470*. {{formula}}223{{/formula}}
471*. {{formula}}p{{/formula}}-Tree
472*. Here’s some display math: {{formula}}\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}{{/formula}}
473*. Here’s one that has a line break in it: {{formula}}\alpha + \omega \times x^2{{/formula}}.
475These shouldn’t be math:
477*. To get the famous equation, write {{code}}$e = mc^2${{/code}}.
478*. $22,000 is a //lot// of money. So is $34,000. (It worked if “lot” is emphasized.)
479*. Shoes ($20) and socks ($5).
480*. Escaped {{code}}${{/code}}: $73 //this should be emphasized// 23$.
482Here’s a LaTeX table:
486----
488= Special Characters {{id name="special-characters" /}}=
490Here is some unicode:
492*. I hat: Î
493*. o umlaut: ö
494*. section: §
495*. set membership: ∈
496*. copyright: ©
498AT&T has an ampersand in their name.
500AT&T is another way to write it.
502This & that.
5044 < 5.
5066 > 5.
508Backslash: \
510Backtick: `
512Asterisk: *
514Underscore: _
516Left brace: {
518Right brace: }
520Left bracket: [
522Right bracket: ]
524Left paren: (
526Right paren: )
528Greater-than: >
530Hash: #
532Period: .
534Bang: !
536Plus: +
538Minus: -
541----
543= Links {{id name="links" /}}=
545== Explicit {{id name="explicit" /}}==
547Just a [[URL>>/url/]].
549[[URL and title>>/url/]].
551[[URL and title>>/url/]].
553[[URL and title>>/url/]].
555[[URL and title>>/url/]]
557[[URL and title>>/url/]]
559[[with_underscore>>/url/with_underscore]]
561[[Email link>>mailto:nobody@nowhere.net]]
563[[Empty>>]].
565== Reference {{id name="reference" /}}==
567Foo [[bar>>/url/]].
569With [[embedded [brackets]>>/url/]].
571[[b>>/url/]] by itself should be a link.
573Indented [[once>>/url]].
575Indented [[twice>>/url]].
577Indented [[thrice>>/url]].
579This should [not][] be a link.
582{{code}}
583[not]: /url
584{{/code}}
586Foo [[bar>>/url/]].
588Foo [[biz>>/url/]].
590== With ampersands {{id name="with-ampersands" /}}==
592Here’s a [[link with an ampersand in the URL>>http://example.com/?foo=1&bar=2]].
594Here’s a link with an amersand in the link text: [[AT&T>>http://att.com/]].
596Here’s an [[inline link>>/script?foo=1&bar=2]].
598Here’s an [[inline link in pointy braces>>/script?foo=1&bar=2]].
600== Autolinks {{id name="autolinks" /}}==
602With an ampersand: http://example.com/?foo=1&bar=2
604*. In a list?
605*. http://example.com/
606*. It should.
608An e-mail address: [[nobody@nowhere.net>>mailto:nobody@nowhere.net]]
610>Blockquoted: http://example.com/
612Auto-links should not occur here: {{code}}<http://example.com/>{{/code}}
615{{code}}
616or here: <http://example.com/>
617{{/code}}
620----
622= Images {{id name="images" /}}=
624From “Voyage dans la Lune” by Georges Melies (1902):
626[[image:lalune.jpg||alt="lalune" title="fig:Voyage dans la Lune"]]
628Here is a movie [[image:movie.jpg||alt="movie"]] icon.
631----
633= Footnotes {{id name="footnotes" /}}=
635Here is a footnote reference,{{footnote}}Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.{{/footnote}} and another.{{footnote}}Here’s the long note. This one contains multiple blocks.
637Subsequent blocks are indented to show that they belong to the footnote (as with list items).
640{{code}}
641 { <code> }
642{{/code}}
644If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.{{/footnote}} This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.{{footnote}}This is //easier// to type. Inline notes may contain [[links>>http://google.com]] and {{code}}]{{/code}} verbatim characters, as well as [bracketed text].{{/footnote}}
646>Notes can go in quotes.{{footnote}}In quote.{{/footnote}}
6481. And in list items.{{footnote}}In list.{{/footnote}}
650This paragraph should not be part of the note, as it is not indented.