git.iko.soy/typeable/pandoc
on 2.2.3 help sign in
typeable/pandoc/test/writer.mediawiki
645 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 />
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’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
173Here’s another:
175# First
176# Second:
177#* Fee
178#* Fie
179#* Foe
180# Third
182Same thing but with paragraphs:
184# First
185# Second:
186#* Fee
187#* Fie
188#* Foe
189# Third
191== Tabs and spaces ==
193* this is a list item indented with tabs
194* this is a list item indented with spaces
195** this is an example list item indented with tabs
196** this is an example list item indented with spaces
198== Fancy list markers ==
200<ol start="2" style="list-style-type: decimal;">
201<li>begins with 2</li>
202<li><p>and now 3</p>
203<p>with a continuation</p>
204<ol start="4" style="list-style-type: lower-roman;">
205<li>sublist with roman numerals, starting with 4</li>
206<li>more items
207<ol style="list-style-type: upper-alpha;">
208<li>a subsublist</li>
209<li>a subsublist</li></ol>
210</li></ol>
211</li></ol>
213Nesting:
215<ol style="list-style-type: upper-alpha;">
216<li>Upper Alpha
217<ol style="list-style-type: upper-roman;">
218<li>Upper Roman.
219<ol start="6" style="list-style-type: decimal;">
220<li>Decimal start with 6
221<ol start="3" style="list-style-type: lower-alpha;">
222<li>Lower alpha with paren</li></ol>
223</li></ol>
224</li></ol>
225</li></ol>
227Autonumbering:
229# Autonumber.
230# More.
231## Nested.
233Should not be a list item:
235M.A. 2007
237B. Williams
240-----
242= Definition Lists =
244Tight using spaces:
246; apple
247: red fruit
248; orange
249: orange fruit
250; banana
251: yellow fruit
253Tight using tabs:
255; apple
256: red fruit
257; orange
258: orange fruit
259; banana
260: yellow fruit
262Loose:
264; apple
265: red fruit
266; orange
267: orange fruit
268; banana
269: yellow fruit
271Multiple blocks with italics:
273<dl>
274<dt>''apple''</dt>
275<dd><p>red fruit</p>
276<p>contains seeds, crisp, pleasant to taste</p></dd>
277<dt>''orange''</dt>
278<dd><p>orange fruit</p>
279<pre>{ orange code block }</pre>
280<blockquote><p>orange block quote</p></blockquote></dd></dl>
282Multiple definitions, tight:
284; apple
285: red fruit
286: computer
287; orange
288: orange fruit
289: bank
291Multiple definitions, loose:
293; apple
294: red fruit
295: computer
296; orange
297: orange fruit
298: bank
300Blank line after term, indented marker, alternate markers:
302; apple
303: red fruit
304: computer
305; orange
306: orange fruit
307;# sublist
308;# sublist
310= HTML Blocks =
312Simple block on one line:
314<div>
316foo
318</div>
319And nested without indentation:
321<div>
323<div>
325<div>
327foo
330</div>
332</div>
333<div>
335bar
337</div>
339</div>
340Interpreted markdown in a table:
342<table>
343<tr>
344<td>
345This is ''emphasized''
346</td>
347<td>
348And this is '''strong'''
349</td>
350</tr>
351</table>
352<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
353Here’s a simple block:
355<div>
357foo
360</div>
361This should be a code block, though:
363<pre>&lt;div&gt;
364 foo
365&lt;/div&gt;</pre>
366As should this:
368<pre>&lt;div&gt;foo&lt;/div&gt;</pre>
369Now, nested:
371<div>
373<div>
375<div>
377foo
379</div>
381</div>
383</div>
384This should just be an HTML comment:
386<!-- Comment -->
387Multiline:
389<!--
390Blah
391Blah
392-->
393<!--
394 This is another comment.
395-->
396Code block:
398<pre>&lt;!-- Comment --&gt;</pre>
399Just plain comment, with trailing spaces on the line:
401<!-- foo -->
402Code:
404<pre>&lt;hr /&gt;</pre>
405Hr’s:
407<hr>
408<hr />
409<hr />
410<hr>
411<hr />
412<hr />
413<hr class="foo" id="bar" />
414<hr class="foo" id="bar" />
415<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 display="inline">2+2=4</math>
473* <math display="inline">x \in y</math>
474* <math display="inline">\alpha \wedge \omega</math>
475* <math display="inline">223</math>
476* <math display="inline">p</math>-Tree
477* Here’s some display math: <math display="block">\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 display="inline">\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]].
574With [[url/|embedded [brackets]]].
576[[url/|b]] by itself should be a link.
578Indented [[url|once]].
580Indented [[url|twice]].
582Indented [[url|thrice]].
584This should [not][] be a link.
586<pre>[not]: /url</pre>
587Foo [[url/|bar]].
589Foo [[url/|biz]].
591== With ampersands ==
593Here’s a [http://example.com/?foo=1&bar=2 link with an ampersand in the URL].
595Here’s a link with an amersand in the link text: [http://att.com/ AT&amp;T].
597Here’s an [[script?foo=1&bar=2|inline link]].
599Here’s an [[script?foo=1&bar=2|inline link in pointy braces]].
601== Autolinks ==
603With an ampersand: http://example.com/?foo=1&bar=2
605* In a list?
606* http://example.com/
607* It should.
609An e-mail address: [mailto:nobody@nowhere.net nobody@nowhere.net]
611<blockquote>Blockquoted: http://example.com/
612</blockquote>
613Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code>
615<pre>or here: &lt;http://example.com/&gt;</pre>
617-----
619= Images =
621From “Voyage dans la Lune” by Georges Melies (1902):
623[[File:lalune.jpg|frame|none|alt=Voyage dans la Lune|caption lalune]]
625Here is a movie [[File:movie.jpg|movie]] icon.
628-----
630= Footnotes =
632Here 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.</ref> and another.<ref>Here’s the long note. This one contains multiple blocks.
634Subsequent blocks are indented to show that they belong to the footnote (as with list items).
636<pre> { &lt;code&gt; }</pre>
637If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.</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].</ref>
639<blockquote>Notes can go in quotes.<ref>In quote.</ref>
640</blockquote>
641# And in list items.<ref>In list.</ref>
643This paragraph should not be part of the note, as it is not indented.
645<references />