git.iko.soy/typeable/pandoc
on 1.8 help sign in
typeable/pandoc/tests/writer.mediawiki
661 lines 10 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 />
40here.
43-----
45= Block Quotes =
47E-mail style:
49<blockquote>This is a block quote. It is pretty short.
50</blockquote>
51<blockquote>Code in a block quote:
53<pre>sub status {
54 print &quot;working&quot;;
55}</pre>
56A list:
58# item one
59# item two
61Nested block quotes:
63<blockquote>nested
64</blockquote>
65<blockquote>nested
66</blockquote></blockquote>
67This should not be a block quote: 2 &gt; 1.
69And a following paragraph.
72-----
74= Code Blocks =
76Code:
78<pre>---- (should be four hyphens)
80sub status {
81 print &quot;working&quot;;
84this code block is indented by one tab</pre>
85And:
87<pre> this code block is indented by two tabs
89These should not be escaped: \$ \\ \&gt; \[ \{</pre>
91-----
93= Lists =
95== Unordered ==
97Asterisks tight:
99* asterisk 1
100* asterisk 2
101* asterisk 3
103Asterisks loose:
105* asterisk 1
106* asterisk 2
107* asterisk 3
109Pluses tight:
111* Plus 1
112* Plus 2
113* Plus 3
115Pluses loose:
117* Plus 1
118* Plus 2
119* Plus 3
121Minuses tight:
123* Minus 1
124* Minus 2
125* Minus 3
127Minuses loose:
129* Minus 1
130* Minus 2
131* Minus 3
133== Ordered ==
135Tight:
137# First
138# Second
139# Third
141and:
143# One
144# Two
145# Three
147Loose using tabs:
149# First
150# Second
151# Third
153and using spaces:
155# One
156# Two
157# Three
159Multiple paragraphs:
161<ol style="list-style-type: decimal;">
162<li><p>Item 1, graf one.</p>
163<p>Item 1. graf two. The quick brown fox jumped over the lazy dog&rsquo;s back.</p></li>
164<li><p>Item 2.</p></li>
165<li><p>Item 3.</p></li></ol>
167== Nested ==
169* Tab
170** Tab
171*** Tab
175Here&rsquo;s another:
177# First
178# Second:
179#* Fee
180#* Fie
181#* Foe
183# Third
185Same thing but with paragraphs:
187# First
188# Second:
189#* Fee
190#* Fie
191#* Foe
193# Third
195== Tabs and spaces ==
197* this is a list item indented with tabs
198* this is a list item indented with spaces
199** this is an example list item indented with tabs
200** this is an example list item indented with spaces
203== Fancy list markers ==
205<ol start="2" style="list-style-type: decimal;">
206<li>begins with 2</li>
207<li><p>and now 3</p>
208<p>with a continuation</p>
209<ol start="4" style="list-style-type: lower-roman;">
210<li>sublist with roman numerals, starting with 4</li>
211<li>more items
212<ol style="list-style-type: upper-alpha;">
213<li>a subsublist</li>
214<li>a subsublist</li></ol>
215</li></ol>
216</li></ol>
218Nesting:
220<ol style="list-style-type: upper-alpha;">
221<li>Upper Alpha
222<ol style="list-style-type: upper-roman;">
223<li>Upper Roman.
224<ol start="6" style="list-style-type: decimal;">
225<li>Decimal start with 6
226<ol start="3" style="list-style-type: lower-alpha;">
227<li>Lower alpha with paren</li></ol>
228</li></ol>
229</li></ol>
230</li></ol>
232Autonumbering:
234# Autonumber.
235# More.
236## Nested.
239Should not be a list item:
241M.A. 2007
243B. Williams
246-----
248= Definition Lists =
250Tight using spaces:
252; apple
253: red fruit
254; orange
255: orange fruit
256; banana
257: yellow fruit
259Tight using tabs:
261; apple
262: red fruit
263; orange
264: orange fruit
265; banana
266: yellow fruit
268Loose:
270; apple
271: red fruit
272; orange
273: orange fruit
274; banana
275: yellow fruit
277Multiple blocks with italics:
279<dl>
280<dt>''apple''</dt>
281<dd><p>red fruit</p>
282<p>contains seeds, crisp, pleasant to taste</p></dd>
283<dt>''orange''</dt>
284<dd><p>orange fruit</p>
285<pre>{ orange code block }</pre>
286<blockquote><p>orange block quote</p></blockquote></dd></dl>
288Multiple definitions, tight:
290; apple
291: red fruit
292: computer
293; orange
294: orange fruit
295: bank
297Multiple definitions, loose:
299; apple
300: red fruit
301: computer
302; orange
303: orange fruit
304: bank
306Blank line after term, indented marker, alternate markers:
308; apple
309: red fruit
310: computer
311; orange
312: orange fruit
313;# sublist
314;# sublist
317= HTML Blocks =
319Simple block on one line:
321<div>
322foo
323</div>
325And nested without indentation:
327<div>
328<div>
329<div>
330foo
331</div>
332</div>
333<div>
334bar
335</div>
336</div>
338Interpreted markdown in a table:
340<table>
341<tr>
342<td>
343This is ''emphasized''
344</td>
345<td>
346And this is '''strong'''
347</td>
348</tr>
349</table>
351<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
353Here&rsquo;s a simple block:
355<div>
357foo
358</div>
360This should be a code block, though:
362<pre>&lt;div&gt;
363 foo
364&lt;/div&gt;</pre>
365As should this:
367<pre>&lt;div&gt;foo&lt;/div&gt;</pre>
368Now, nested:
370<div>
371 <div>
372 <div>
374foo
375</div>
376 </div>
377</div>
379This should just be an HTML comment:
381<!-- Comment -->
383Multiline:
385<!--
386Blah
387Blah
388-->
390<!--
391 This is another comment.
392-->
394Code block:
396<pre>&lt;!-- Comment --&gt;</pre>
397Just plain comment, with trailing spaces on the line:
399<!-- foo -->
401Code:
403<pre>&lt;hr /&gt;</pre>
404Hr&rsquo;s:
406<hr>
408<hr />
410<hr />
412<hr>
414<hr />
416<hr />
418<hr class="foo" id="bar" />
420<hr class="foo" id="bar" />
422<hr class="foo" id="bar">
425-----
427= Inline Markup =
429This is ''emphasized'', and so ''is this''.
431This is '''strong''', and so '''is this'''.
433An ''[[url|emphasized link]]''.
435'''''This is strong and em.'''''
437So is '''''this''''' word.
439'''''This is strong and em.'''''
441So is '''''this''''' word.
443This is code: <tt>&gt;</tt>, <tt>$</tt>, <tt>\</tt>, <tt>\$</tt>, <tt>&lt;html&gt;</tt>.
445<s>This is ''strikeout''.</s>
447Superscripts: a<sup>bc</sup>d a<sup>''hello''</sup> a<sup>hello there</sup>.
449Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.
451These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.
454-----
456= Smart quotes, ellipses, dashes =
458&ldquo;Hello,&rdquo; said the spider. &ldquo;&lsquo;Shelob&rsquo; is my name.&rdquo;
460&lsquo;A&rsquo;, &lsquo;B&rsquo;, and &lsquo;C&rsquo; are letters.
462&lsquo;Oak,&rsquo; &lsquo;elm,&rsquo; and &lsquo;beech&rsquo; are names of trees. So is &lsquo;pine.&rsquo;
464&lsquo;He said, &ldquo;I want to go.&rdquo;&rsquo; Were you alive in the 70&rsquo;s?
466Here is some quoted &lsquo;<tt>code</tt>&rsquo; and a &ldquo;[http://example.com/?foo=1&bar=2 quoted link]&rdquo;.
468Some dashes: one&mdash;two &mdash; three&mdash;four &mdash; five.
470Dashes between numbers: 5&ndash;7, 255&ndash;66, 1987&ndash;1999.
472Ellipses&hellip;and&hellip;and&hellip;.
475-----
477= LaTeX =
479*
480* <math>2+2=4</math>
481* <math>x \in y</math>
482* <math>\alpha \wedge \omega</math>
483* <math>223</math>
484* <math>p</math>-Tree
485* Here&rsquo;s some display math: <math>\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</math>
486* Here&rsquo;s one that has a line break in it: <math>\alpha + \omega \times x^2</math>.
488These shouldn&rsquo;t be math:
490* To get the famous equation, write <tt>$e = mc^2$</tt>.
491* $22,000 is a ''lot'' of money. So is $34,000. (It worked if &ldquo;lot&rdquo; is emphasized.)
492* Shoes ($20) and socks ($5).
493* Escaped <tt>$</tt>: $73 ''this should be emphasized'' 23$.
495Here&rsquo;s a LaTeX table:
499-----
501= Special Characters =
503Here is some unicode:
505* I hat: Î
506* o umlaut: ö
507* section: §
508* set membership: ∈
509* copyright: ©
511AT&amp;T has an ampersand in their name.
513AT&amp;T is another way to write it.
515This &amp; that.
5174 &lt; 5.
5196 &gt; 5.
521Backslash: \
523Backtick: `
525Asterisk: *
527Underscore: _
529Left brace: {
531Right brace: }
533Left bracket: [
535Right bracket: ]
537Left paren: (
539Right paren: )
541Greater-than: &gt;
543Hash: #
545Period: .
547Bang: !
549Plus: +
551Minus: -
554-----
556= Links =
558== Explicit ==
560Just a [[url/|URL]].
562[[url/|URL and title]].
564[[url/|URL and title]].
566[[url/|URL and title]].
568[[url/|URL and title]]
570[[url/|URL and title]]
572[[url/with_underscore|with_underscore]]
574[mailto:nobody@nowhere.net Email link]
576[[|Empty]].
578== Reference ==
580Foo [[url/|bar]].
582Foo [[url/|bar]].
584Foo [[url/|bar]].
586With [[url/|embedded [brackets]]].
588[[url/|b]] by itself should be a link.
590Indented [[url|once]].
592Indented [[url|twice]].
594Indented [[url|thrice]].
596This should [not][] be a link.
598<pre>[not]: /url</pre>
599Foo [[url/|bar]].
601Foo [[url/|biz]].
603== With ampersands ==
605Here&rsquo;s a [http://example.com/?foo=1&bar=2 link with an ampersand in the URL].
607Here&rsquo;s a link with an amersand in the link text: [http://att.com/ AT&amp;T].
609Here&rsquo;s an [[script?foo=1&bar=2|inline link]].
611Here&rsquo;s an [[script?foo=1&bar=2|inline link in pointy braces]].
613== Autolinks ==
615With an ampersand: http://example.com/?foo=1&bar=2
617* In a list?
618* http://example.com/
619* It should.
621An e-mail address: [mailto:nobody@nowhere.net <tt>nobody@nowhere.net</tt>]
623<blockquote>Blockquoted: http://example.com/
624</blockquote>
625Auto-links should not occur here: <tt>&lt;http://example.com/&gt;</tt>
627<pre>or here: &lt;http://example.com/&gt;</pre>
629-----
631= Images =
633From &ldquo;Voyage dans la Lune&rdquo; by Georges Melies (1902):
635[[Image:lalune.jpg|frame|none|alt=Voyage dans la Lune|caption lalune]]
637Here is a movie [[Image:movie.jpg|movie]] icon.
640-----
642= Footnotes =
644Here 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.
645</ref> and another.<ref>Here&rsquo;s the long note. This one contains multiple blocks.
647Subsequent blocks are indented to show that they belong to the footnote (as with list items).
649<pre> { &lt;code&gt; }</pre>
650If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
651</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 <tt>]</tt> verbatim characters, as well as [bracketed text].
652</ref>
654<blockquote>Notes can go in quotes.<ref>In quote.
655</ref>
656</blockquote>
657# And in list items.<ref>In list.</ref>
659This paragraph should not be part of the note, as it is not indented.
661<references />