git.iko.soy/typeable/pandoc
on 1.10.0.3 help sign in
typeable/pandoc/tests/writer.mediawiki
653 lines 10.0 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 =
8== Level 2 with an [[url|embedded link]] ==
10=== Level 3 with ''emphasis'' ===
12==== Level 4 ====
14===== Level 5 =====
16= Level 1 =
18== Level 2 with ''emphasis'' ==
20=== Level 3 ===
22with no blank line
24== Level 2 ==
26with no blank line
29-----
31= 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<br />here.
42-----
44= Block Quotes =
46E-mail style:
48<blockquote>This is a block quote. It is pretty short.
49</blockquote>
50<blockquote>Code in a block quote:
52<pre>sub status {
53 print &quot;working&quot;;
54}</pre>
55A list:
57# item one
58# item two
60Nested block quotes:
62<blockquote>nested
63</blockquote>
64<blockquote>nested
65</blockquote></blockquote>
66This should not be a block quote: 2 &gt; 1.
68And a following paragraph.
71-----
73= Code Blocks =
75Code:
77<pre>---- (should be four hyphens)
79sub status {
80 print &quot;working&quot;;
83this code block is indented by one tab</pre>
84And:
86<pre> this code block is indented by two tabs
88These should not be escaped: \$ \\ \&gt; \[ \{</pre>
90-----
92= Lists =
94== Unordered ==
96Asterisks tight:
98* asterisk 1
99* asterisk 2
100* asterisk 3
102Asterisks loose:
104* asterisk 1
105* asterisk 2
106* asterisk 3
108Pluses tight:
110* Plus 1
111* Plus 2
112* Plus 3
114Pluses loose:
116* Plus 1
117* Plus 2
118* Plus 3
120Minuses tight:
122* Minus 1
123* Minus 2
124* Minus 3
126Minuses loose:
128* Minus 1
129* Minus 2
130* Minus 3
132== Ordered ==
134Tight:
136# First
137# Second
138# Third
140and:
142# One
143# Two
144# Three
146Loose using tabs:
148# First
149# Second
150# Third
152and using spaces:
154# One
155# Two
156# Three
158Multiple paragraphs:
160<ol style="list-style-type: decimal;">
161<li><p>Item 1, graf one.</p>
162<p>Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.</p></li>
163<li><p>Item 2.</p></li>
164<li><p>Item 3.</p></li></ol>
166== Nested ==
168* Tab
169** Tab
170*** Tab
172Here’s another:
174# First
175# Second:
176#* Fee
177#* Fie
178#* Foe
179# Third
181Same thing but with paragraphs:
183# First
184# Second:
185#* Fee
186#* Fie
187#* Foe
188# Third
190== Tabs and spaces ==
192* this is a list item indented with tabs
193* this is a list item indented with spaces
194** this is an example list item indented with tabs
195** this is an example list item indented with spaces
197== Fancy list markers ==
199<ol start="2" style="list-style-type: decimal;">
200<li>begins with 2</li>
201<li><p>and now 3</p>
202<p>with a continuation</p>
203<ol start="4" style="list-style-type: lower-roman;">
204<li>sublist with roman numerals, starting with 4</li>
205<li>more items
206<ol style="list-style-type: upper-alpha;">
207<li>a subsublist</li>
208<li>a subsublist</li></ol>
209</li></ol>
210</li></ol>
212Nesting:
214<ol style="list-style-type: upper-alpha;">
215<li>Upper Alpha
216<ol style="list-style-type: upper-roman;">
217<li>Upper Roman.
218<ol start="6" style="list-style-type: decimal;">
219<li>Decimal start with 6
220<ol start="3" style="list-style-type: lower-alpha;">
221<li>Lower alpha with paren</li></ol>
222</li></ol>
223</li></ol>
224</li></ol>
226Autonumbering:
228# Autonumber.
229# More.
230## Nested.
232Should not be a list item:
234M.A. 2007
236B. Williams
239-----
241= Definition Lists =
243Tight using spaces:
245; apple
246: red fruit
247; orange
248: orange fruit
249; banana
250: yellow fruit
252Tight using tabs:
254; apple
255: red fruit
256; orange
257: orange fruit
258; banana
259: yellow fruit
261Loose:
263; apple
264: red fruit
265; orange
266: orange fruit
267; banana
268: yellow fruit
270Multiple blocks with italics:
272<dl>
273<dt>''apple''</dt>
274<dd><p>red fruit</p>
275<p>contains seeds, crisp, pleasant to taste</p></dd>
276<dt>''orange''</dt>
277<dd><p>orange fruit</p>
278<pre>{ orange code block }</pre>
279<blockquote><p>orange block quote</p></blockquote></dd></dl>
281Multiple definitions, tight:
283; apple
284: red fruit
285: computer
286; orange
287: orange fruit
288: bank
290Multiple definitions, loose:
292; apple
293: red fruit
294: computer
295; orange
296: orange fruit
297: bank
299Blank line after term, indented marker, alternate markers:
301; apple
302: red fruit
303: computer
304; orange
305: orange fruit
306;# sublist
307;# sublist
309= HTML Blocks =
311Simple block on one line:
313<div>
314foo
315</div>
317And nested without indentation:
319<div>
320<div>
321<div>
322foo
323</div>
324</div>
325<div>
326bar
327</div>
328</div>
330Interpreted markdown in a table:
332<table>
333<tr>
334<td>
335This is ''emphasized''
336</td>
337<td>
338And this is '''strong'''
339</td>
340</tr>
341</table>
343<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
345Here’s a simple block:
347<div>
349foo
350</div>
352This should be a code block, though:
354<pre>&lt;div&gt;
355 foo
356&lt;/div&gt;</pre>
357As should this:
359<pre>&lt;div&gt;foo&lt;/div&gt;</pre>
360Now, nested:
362<div>
363 <div>
364 <div>
366foo
367</div>
368 </div>
369</div>
371This should just be an HTML comment:
373<!-- Comment -->
375Multiline:
377<!--
378Blah
379Blah
380-->
382<!--
383 This is another comment.
384-->
386Code block:
388<pre>&lt;!-- Comment --&gt;</pre>
389Just plain comment, with trailing spaces on the line:
391<!-- foo -->
393Code:
395<pre>&lt;hr /&gt;</pre>
396Hr’s:
398<hr>
400<hr />
402<hr />
404<hr>
406<hr />
408<hr />
410<hr class="foo" id="bar" />
412<hr class="foo" id="bar" />
414<hr class="foo" id="bar">
417-----
419= Inline Markup =
421This is ''emphasized'', and so ''is this''.
423This is '''strong''', and so '''is this'''.
425An ''[[url|emphasized link]]''.
427'''''This is strong and em.'''''
429So is '''''this''''' word.
431'''''This is strong and em.'''''
433So is '''''this''''' word.
435This is code: <code>&gt;</code>, <code>$</code>, <code>\</code>, <code>\$</code>, <code>&lt;html&gt;</code>.
437<s>This is ''strikeout''.</s>
439Superscripts: a<sup>bc</sup>d a<sup>''hello''</sup> a<sup>hello there</sup>.
441Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.
443These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.
446-----
448= Smart quotes, ellipses, dashes =
450“Hello,” said the spider. “‘Shelob’ is my name.”
452‘A’, ‘B’, and ‘C’ are letters.
454‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
456‘He said, “I want to go.”’ Were you alive in the 70’s?
458Here is some quoted ‘<code>code</code>’ and a “[http://example.com/?foo=1&bar=2 quoted link]”.
460Some dashes: one—two — three—four — five.
462Dashes between numbers: 5–7, 255–66, 1987–1999.
464Ellipses…and…and….
467-----
469= LaTeX =
471*
472* <math>2+2=4</math>
473* <math>x \in y</math>
474* <math>\alpha \wedge \omega</math>
475* <math>223</math>
476* <math>p</math>-Tree
477* Here’s some display math: <math>\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</math>
478* Here’s one that has a line break in it: <math>\alpha + \omega \times x^2</math>.
480These shouldn’t be math:
482* To get the famous equation, write <code>$e = mc^2$</code>.
483* $22,000 is a ''lot'' of money. So is $34,000. (It worked if “lot” is emphasized.)
484* Shoes ($20) and socks ($5).
485* Escaped <code>$</code>: $73 ''this should be emphasized'' 23$.
487Here’s a LaTeX table:
491-----
493= Special Characters =
495Here is some unicode:
497* I hat: Î
498* o umlaut: ö
499* section: §
500* set membership: ∈
501* copyright: ©
503AT&amp;T has an ampersand in their name.
505AT&amp;T is another way to write it.
507This &amp; that.
5094 &lt; 5.
5116 &gt; 5.
513Backslash: \
515Backtick: `
517Asterisk: *
519Underscore: _
521Left brace: {
523Right brace: }
525Left bracket: [
527Right bracket: ]
529Left paren: (
531Right paren: )
533Greater-than: &gt;
535Hash: #
537Period: .
539Bang: !
541Plus: +
543Minus: -
546-----
548= Links =
550== Explicit ==
552Just a [[url/|URL]].
554[[url/|URL and title]].
556[[url/|URL and title]].
558[[url/|URL and title]].
560[[url/|URL and title]]
562[[url/|URL and title]]
564[[url/with_underscore|with_underscore]]
566[mailto:nobody@nowhere.net Email link]
568[[|Empty]].
570== Reference ==
572Foo [[url/|bar]].
574Foo [[url/|bar]].
576Foo [[url/|bar]].
578With [[url/|embedded [brackets]]].
580[[url/|b]] by itself should be a link.
582Indented [[url|once]].
584Indented [[url|twice]].
586Indented [[url|thrice]].
588This should [not][] be a link.
590<pre>[not]: /url</pre>
591Foo [[url/|bar]].
593Foo [[url/|biz]].
595== With ampersands ==
597Here’s a [http://example.com/?foo=1&bar=2 link with an ampersand in the URL].
599Here’s a link with an amersand in the link text: [http://att.com/ AT&amp;T].
601Here’s an [[script?foo=1&bar=2|inline link]].
603Here’s an [[script?foo=1&bar=2|inline link in pointy braces]].
605== Autolinks ==
607With an ampersand: http://example.com/?foo=1&bar=2
609* In a list?
610* http://example.com/
611* It should.
613An e-mail address: [mailto:nobody@nowhere.net nobody@nowhere.net]
615<blockquote>Blockquoted: http://example.com/
616</blockquote>
617Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code>
619<pre>or here: &lt;http://example.com/&gt;</pre>
621-----
623= Images =
625From “Voyage dans la Lune” by Georges Melies (1902):
627[[Image:lalune.jpg|frame|none|alt=Voyage dans la Lune|caption lalune]]
629Here is a movie [[Image:movie.jpg|movie]] icon.
632-----
634= Footnotes =
636Here is a footnote reference,<ref>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.
637</ref> and another.<ref>Here’s the long note. This one contains multiple blocks.
639Subsequent blocks are indented to show that they belong to the footnote (as with list items).
641<pre> { &lt;code&gt; }</pre>
642If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
643</ref> This should ''not'' be a footnote reference, because it contains a space.[^my note] Here is an inline note.<ref>This is ''easier'' to type. Inline notes may contain [http://google.com links] and <code>]</code> verbatim characters, as well as [bracketed text].
644</ref>
646<blockquote>Notes can go in quotes.<ref>In quote.
647</ref>
648</blockquote>
649# And in list items.<ref>In list.</ref>
651This paragraph should not be part of the note, as it is not indented.
653<references />