git.iko.soy/typeable/pandoc
on rc/2.9.1.1 help sign in
typeable/pandoc/test/writer.muse
722 lines 10 kB history raw
1#author John MacFarlane; Anonymous
2#title Pandoc Test Suite
3#date July 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 [[/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. <verbatim>*</verbatim> criminey.
44There should be a hard line break<br>
45here.
47----
49* Block Quotes
51E-mail style:
53<quote>
54This is a block quote. It is pretty short.
55</quote>
57<quote>
58Code in a block quote:
60<example>
61sub status {
62 print "working";
64</example>
66A list:
68 1. item one
69 2. item two
71Nested block quotes:
73<quote>
74nested
75</quote>
77<quote>
78nested
79</quote>
80</quote>
82This should not be a block quote: 2 > 1.
84And a following paragraph.
86----
88* Code Blocks
90Code:
92<example>
93---- (should be four hyphens)
95sub status {
96 print "working";
99this code block is indented by one tab
100</example>
102And:
104<example>
105 this code block is indented by two tabs
107These should not be escaped: \$ \\ \> \[ \{
108</example>
110----
112* Lists
114** Unordered
116Asterisks tight:
118 - asterisk 1
119 - asterisk 2
120 - asterisk 3
122Asterisks loose:
124 - asterisk 1
125 - asterisk 2
126 - asterisk 3
128Pluses tight:
130 - Plus 1
131 - Plus 2
132 - Plus 3
134Pluses loose:
136 - Plus 1
137 - Plus 2
138 - Plus 3
140Minuses tight:
142 - Minus 1
143 - Minus 2
144 - Minus 3
146Minuses loose:
148 - Minus 1
149 - Minus 2
150 - Minus 3
152** Ordered
154Tight:
156 1. First
157 2. Second
158 3. Third
160and:
162 1. One
163 2. Two
164 3. Three
166Loose using tabs:
168 1. First
169 2. Second
170 3. Third
172and using spaces:
174 1. One
175 2. Two
176 3. Three
178Multiple paragraphs:
180 1. Item 1, graf one.
182 Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
183 2. Item 2.
184 3. Item 3.
186** Nested
188 - Tab
189 - Tab
190 - Tab
192Here’s another:
194 1. First
195 2. Second:
196 - Fee
197 - Fie
198 - Foe
199 3. Third
201Same thing but with paragraphs:
203 1. First
204 2. Second:
206 - Fee
207 - Fie
208 - Foe
209 3. Third
211** Tabs and spaces
213 - this is a list item indented with tabs
214 - this is a list item indented with spaces
216 - this is an example list item indented with tabs
217 - this is an example list item indented with spaces
219** Fancy list markers
221 2. begins with 2
222 3. and now 3
224 with a continuation
226 iv. sublist with roman numerals, starting with 4
227 v. more items
228 A. a subsublist
229 B. a subsublist
231Nesting:
233 A. Upper Alpha
234 I. Upper Roman.
235 6. Decimal start with 6
236 c. Lower alpha with paren
238Autonumbering:
240 1. Autonumber.
241 2. More.
242 1. Nested.
244Should not be a list item:
246M.A. 2007
248B. Williams
250----
252* Definition Lists
254Tight using spaces:
256 apple :: red fruit
257 orange :: orange fruit
258 banana :: yellow fruit
260Tight using tabs:
262 apple :: red fruit
263 orange :: orange fruit
264 banana :: yellow fruit
266Loose:
268 apple :: red fruit
269 orange :: orange fruit
270 banana :: yellow fruit
272Multiple blocks with italics:
274 *apple* :: red fruit
276 contains seeds, crisp, pleasant to taste
277 *orange* :: orange fruit
279 <example>
280 { orange code block }
281 </example>
283 <quote>
284 orange block quote
285 </quote>
287Multiple definitions, tight:
289 apple :: red fruit
290 :: computer
291 orange :: orange fruit
292 :: bank
294Multiple definitions, loose:
296 apple :: red fruit
297 :: computer
298 orange :: orange fruit
299 :: bank
301Blank line after term, indented marker, alternate markers:
303 apple :: red fruit
304 :: computer
305 orange :: orange fruit
307 1. sublist
308 2. sublist
310* HTML Blocks
312Simple block on one line:
314foo
315And nested without indentation:
317foo
319bar
320Interpreted markdown in a table:
322<literal style="html">
323<table>
324</literal>
326<literal style="html">
327<tr>
328</literal>
330<literal style="html">
331<td>
332</literal>
334This is *emphasized*
336<literal style="html">
337</td>
338</literal>
340<literal style="html">
341<td>
342</literal>
344And this is **strong**
346<literal style="html">
347</td>
348</literal>
350<literal style="html">
351</tr>
352</literal>
354<literal style="html">
355</table>
356</literal>
358<literal style="html">
359<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
360</literal>
362Here’s a simple block:
364foo
366This should be a code block, though:
368<example>
369<div>
370 foo
371</div>
372</example>
374As should this:
376<example>
377<div>foo</div>
378</example>
380Now, nested:
382foo
383This should just be an HTML comment:
385<literal style="html">
386<!-- Comment -->
387</literal>
389Multiline:
391<literal style="html">
392<!--
393Blah
394Blah
395-->
396</literal>
398<literal style="html">
399<!--
400 This is another comment.
401-->
402</literal>
404Code block:
406<example>
407<!-- Comment -->
408</example>
410Just plain comment, with trailing spaces on the line:
412<literal style="html">
413<!-- foo -->
414</literal>
416Code:
418<example>
419<hr />
420</example>
422Hr’s:
424<literal style="html">
425<hr>
426</literal>
428<literal style="html">
429<hr />
430</literal>
432<literal style="html">
433<hr />
434</literal>
436<literal style="html">
437<hr>
438</literal>
440<literal style="html">
441<hr />
442</literal>
444<literal style="html">
445<hr />
446</literal>
448<literal style="html">
449<hr class="foo" id="bar" />
450</literal>
452<literal style="html">
453<hr class="foo" id="bar" />
454</literal>
456<literal style="html">
457<hr class="foo" id="bar">
458</literal>
460----
462* Inline Markup
464This is *emphasized*, and so *is this*.
466This is **strong**, and so **is this**.
468An *[[/url][emphasized link]]*.
470***This is strong and em.***
472So is ***this*** word.
474***This is strong and em.***
476So is ***this*** word.
478This is code: =>=, =$=, =\=, =\$=, =<html>=.
480<del>This is *strikeout*.</del>
482Superscripts: a<sup>bc</sup>d a<sup>*hello*</sup> a<sup>hello there</sup>.
484Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.
486These should not be superscripts or subscripts, because of the unescaped
487spaces: a^b c^d, a~b c~d.
489----
491* Smart quotes, ellipses, dashes
493“Hello,” said the spider. “‘Shelob’ is my name.”
495‘A’, ‘B’, and ‘C’ are letters.
497‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
499‘He said, “I want to go.”’ Were you alive in the 70’s?
501Here is some quoted ‘=code=’ and a “[[http://example.com/?foo=1&bar=2][quoted
502link]]”.
504Some dashes: one—two — three—four — five.
506Dashes between numbers: 5–7, 255–66, 1987–1999.
508Ellipses…and…and….
510----
512* LaTeX
514 - <literal style="tex">\cite[22-23]{smith.1899}</literal>
515 - <verbatim>2 + 2 = 4</verbatim>
516 - *x* ∈ *y*
517 - *α* ∧ *ω*
518 - 223
519 - *p*-Tree
520 - Here’s some display math:
521 <verbatim>$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</verbatim>
522 - Here’s one that has a line break in it: *α* + *ω* × *x*<sup>2</sup>.
524These shouldn’t be math:
526 - To get the famous equation, write <code>$e = mc^2$</code>.
527 - $22,000 is a *lot* of money. So is $34,000. (It worked if “lot” is
528 emphasized.)
529 - Shoes ($20) and socks ($5).
530 - Escaped =$=: $73 *this should be emphasized* 23$.
532Here’s a LaTeX table:
534<literal style="tex">
535\begin{tabular}{|l|l|}\hline
536Animal & Number \\ \hline
537Dog & 2 \\
538Cat & 1 \\ \hline
539\end{tabular}
540</literal>
542----
544* Special Characters
546Here is some unicode:
548 - I hat: Î
549 - o umlaut: ö
550 - section: §
551 - set membership: ∈
552 - copyright: ©
554AT&T has an ampersand in their name.
556AT&T is another way to write it.
558This & that.
5604 <verbatim><</verbatim> 5.
5626 > 5.
564Backslash: \
566Backtick: `
568Asterisk: <verbatim>*</verbatim>
570Underscore: _
572Left brace: {
574Right brace: }
576Left bracket: [
578Right bracket: ]
580Left paren: (
582Right paren: )
584Greater-than: >
586Hash: <verbatim>#</verbatim>
588Period: .
590Bang: !
592Plus: +
594Minus: -
596----
598* Links
600** Explicit
602Just a [[/url/][URL]].
604[[/url/][URL and title]].
606[[/url/][URL and title]].
608[[/url/][URL and title]].
610[[/url/][URL and title]]
612[[/url/][URL and title]]
614[[/url/with_underscore][with_underscore]]
616[[mailto:nobody@nowhere.net][Email link]]
618[[][Empty]].
620** Reference
622Foo [[/url/][bar]].
624With [[/url/][embedded <verbatim>[brackets]</verbatim>]].
626[[/url/][b]] by itself should be a link.
628Indented [[/url][once]].
630Indented [[/url][twice]].
632Indented [[/url][thrice]].
634This should [not][] be a link.
636<example>
637[not]: /url
638</example>
640Foo [[/url/][bar]].
642Foo [[/url/][biz]].
644** With ampersands
646Here’s a [[http://example.com/?foo=1&bar=2][link with an ampersand in the
647URL]].
649Here’s a link with an amersand in the link text: [[http://att.com/][AT&T]].
651Here’s an [[/script?foo=1&bar=2][inline link]].
653Here’s an [[/script?foo=1&bar=2][inline link in pointy braces]].
655** Autolinks
657With an ampersand: [[http://example.com/?foo=1&bar=2]]
659 - In a list?
660 - [[http://example.com/]]
661 - It should.
663An e-mail address: [[mailto:nobody@nowhere.net][nobody@nowhere.net]]
665<quote>
666Blockquoted: [[http://example.com/]]
667</quote>
669Auto-links should not occur here: =<http://example.com/>=
671<example>
672or here: <http://example.com/>
673</example>
675----
677* Images
679From “Voyage dans la Lune” by Georges Melies (1902):
681[[lalune.jpg][Voyage dans la Lune]]
683Here is a movie [[movie.jpg][movie]] icon.
685----
687* Footnotes
689Here is a footnote reference,[1] and another.[2] This should *not* be a
690footnote reference, because it contains a space.[^my note] Here is an inline
691note.[3]
693<quote>
694Notes can go in quotes.[4]
695</quote>
697 1. And in list items.[5]
699This paragraph should not be part of the note, as it is not indented.
701[1] Here is the footnote. It can go anywhere after the footnote reference. It
702 need not be placed at the end of the document.
704[2] Here’s the long note. This one contains multiple blocks.
706 Subsequent blocks are indented to show that they belong to the footnote
707 (as with list items).
709 <example>
710 { <code> }
711 </example>
713 If you want, you can indent every line, but you can also be lazy and just
714 indent the first line of each block.
716[3] This is *easier* to type. Inline notes may contain
717 [[http://google.com][links]] and =]= verbatim characters, as well as
718 [bracketed text].
720[4] In quote.
722[5] In list.