git.iko.soy/typeable/pandoc
on 1.0 help sign in
typeable/pandoc/tests/writer.mediawiki
604 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 [http://{{SERVERNAME}}/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
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
101Asterisks loose:
103* asterisk 1
104* asterisk 2
105* asterisk 3
106Pluses tight:
108* Plus 1
109* Plus 2
110* Plus 3
111Pluses loose:
113* Plus 1
114* Plus 2
115* Plus 3
116Minuses tight:
118* Minus 1
119* Minus 2
120* Minus 3
121Minuses loose:
123* Minus 1
124* Minus 2
125* Minus 3
126=== Ordered ===
128Tight:
130# First
131# Second
132# Third
133and:
135# One
136# Two
137# Three
138Loose using tabs:
140# First
141# Second
142# Third
143and using spaces:
145# One
146# Two
147# Three
148Multiple paragraphs:
150<ol style="list-style-type: decimal;">
151<li><p>Item 1, graf one.</p>
152<p>Item 1. graf two. The quick brown fox jumped over the lazy dog&rsquo;s back.</p></li>
153<li><p>Item 2.</p></li>
154<li><p>Item 3.</p></li></ol>
156=== Nested ===
158* Tab
159** Tab
160*** Tab
161Here&rsquo;s another:
163# First
164# Second:
165#* Fee
166#* Fie
167#* Foe
168# Third
169Same thing but with paragraphs:
171# First
172# Second:
173#* Fee
174#* Fie
175#* Foe
176# Third
177=== Tabs and spaces ===
179* this is a list item indented with tabs
180* this is a list item indented with spaces
181** this is an example list item indented with tabs
182** this is an example list item indented with spaces
183=== Fancy list markers ===
185<ol start="2" style="list-style-type: decimal;">
186<li>begins with 2</li>
187<li><p>and now 3</p>
188<p>with a continuation</p>
189<ol start="4" style="list-style-type: lower-roman;">
190<li>sublist with roman numerals, starting with 4</li>
191<li>more items
192<ol style="list-style-type: upper-alpha;">
193<li>a subsublist</li>
194<li>a subsublist</li></ol>
195</li></ol>
196</li></ol>
198Nesting:
200<ol style="list-style-type: upper-alpha;">
201<li>Upper Alpha
202<ol style="list-style-type: upper-roman;">
203<li>Upper Roman.
204<ol start="6" style="list-style-type: decimal;">
205<li>Decimal start with 6
206<ol start="3" style="list-style-type: lower-alpha;">
207<li>Lower alpha with paren</li></ol>
208</li></ol>
209</li></ol>
210</li></ol>
212Autonumbering:
214# Autonumber.
215# More.
216## Nested.
217Should not be a list item:
219M.A.&#160;2007
221B. Williams
224-----
226== Definition Lists ==
228Tight using spaces:
230; apple
231: red fruit
232; orange
233: orange fruit
234; banana
235: yellow fruit
236Tight using tabs:
238; apple
239: red fruit
240; orange
241: orange fruit
242; banana
243: yellow fruit
244Loose:
246; apple
247: red fruit
248; orange
249: orange fruit
250; banana
251: yellow fruit
252Multiple blocks with italics:
254<dl>
255<dt>''apple''</dt>
256<dd><p>red fruit</p>
257<p>contains seeds, crisp, pleasant to taste</p></dd>
258<dt>''orange''</dt>
259<dd><p>orange fruit</p>
260<pre>{ orange code block }</pre>
261<blockquote><p>orange block quote</p></blockquote></dd></dl>
263== HTML Blocks ==
265Simple block on one line:
267<div>
268foo
269</div>
271And nested without indentation:
273<div>
274<div>
275<div>
276foo
277</div>
278</div>
279<div>
280bar
281</div>
282</div>
284Interpreted markdown in a table:
286<table>
287<tr>
288<td>
289This is ''emphasized''
290</td>
291<td>
292And this is '''strong'''
293</td>
294</tr>
295</table>
297<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
299Here&rsquo;s a simple block:
301<div>
303foo
304</div>
306This should be a code block, though:
308<pre>&lt;div&gt;
309 foo
310&lt;/div&gt;</pre>
311As should this:
313<pre>&lt;div&gt;foo&lt;/div&gt;</pre>
314Now, nested:
316<div>
317 <div>
318 <div>
320foo
321</div>
322 </div>
323</div>
325This should just be an HTML comment:
327<!-- Comment -->
329Multiline:
331<!--
332Blah
333Blah
334-->
336<!--
337 This is another comment.
338-->
340Code block:
342<pre>&lt;!-- Comment --&gt;</pre>
343Just plain comment, with trailing spaces on the line:
345<!-- foo -->
347Code:
349<pre>&lt;hr /&gt;</pre>
350Hr&rsquo;s:
352<hr>
354<hr />
356<hr />
358<hr>
360<hr />
362<hr />
364<hr class="foo" id="bar" />
366<hr class="foo" id="bar" />
368<hr class="foo" id="bar">
371-----
373== Inline Markup ==
375This is ''emphasized'', and so ''is this''.
377This is '''strong''', and so '''is this'''.
379An ''[http://{{SERVERNAME}}/url emphasized link]''.
381'''''This is strong and em.'''''
383So is '''''this''''' word.
385'''''This is strong and em.'''''
387So is '''''this''''' word.
389This is code: <tt>&gt;</tt>, <tt>$</tt>, <tt>\</tt>, <tt>\$</tt>, <tt>&lt;html&gt;</tt>.
391<s>This is ''strikeout''.</s>
393Superscripts: a<sup>bc</sup>d a<sup>''hello''</sup> a<sup>hello&#160;there</sup>.
395Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many&#160;of&#160;them</sub>O.
397These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.
400-----
402== Smart quotes, ellipses, dashes ==
404&ldquo;Hello,&rdquo; said the spider. &ldquo;&lsquo;Shelob&rsquo; is my name.&rdquo;
406&lsquo;A&rsquo;, &lsquo;B&rsquo;, and &lsquo;C&rsquo; are letters.
408&lsquo;Oak,&rsquo; &lsquo;elm,&rsquo; and &lsquo;beech&rsquo; are names of trees. So is &lsquo;pine.&rsquo;
410&lsquo;He said, &ldquo;I want to go.&rdquo;&rsquo; Were you alive in the 70&rsquo;s?
412Here is some quoted &lsquo;<tt>code</tt>&rsquo; and a &ldquo;[http://example.com/?foo=1&bar=2 quoted link]&rdquo;.
414Some dashes: one&mdash;two &mdash; three&mdash;four &mdash; five.
416Dashes between numbers: 5&ndash;7, 255&ndash;66, 1987&ndash;1999.
418Ellipses&hellip;and&hellip;and&hellip;.
421-----
423== LaTeX ==
425*
426* <math>2+2=4</math>
427* <math>x \in y</math>
428* <math>\alpha \wedge \omega</math>
429* <math>223</math>
430* <math>p</math>-Tree
431* Here&rsquo;s some display math: <math>\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</math>
432* Here&rsquo;s one that has a line break in it: <math>\alpha + \omega \times x^2</math>.
433These shouldn&rsquo;t be math:
435* To get the famous equation, write <tt>$e = mc^2$</tt>.
436* $22,000 is a ''lot'' of money. So is $34,000. (It worked if &ldquo;lot&rdquo; is emphasized.)
437* Shoes ($20) and socks ($5).
438* Escaped <tt>$</tt>: $73 ''this should be emphasized'' 23$.
439Here&rsquo;s a LaTeX table:
444-----
446== Special Characters ==
448Here is some unicode:
450* I hat: Î
451* o umlaut: ö
452* section: §
453* set membership: ∈
454* copyright: ©
455AT&amp;T has an ampersand in their name.
457AT&amp;T is another way to write it.
459This &amp; that.
4614 &lt; 5.
4636 &gt; 5.
465Backslash: \
467Backtick: `
469Asterisk: *
471Underscore: _
473Left brace: {
475Right brace: }
477Left bracket: [
479Right bracket: ]
481Left paren: (
483Right paren: )
485Greater-than: &gt;
487Hash: #
489Period: .
491Bang: !
493Plus: +
495Minus: -
498-----
500== Links ==
502=== Explicit ===
504Just a [http://{{SERVERNAME}}/url/ URL].
506[http://{{SERVERNAME}}/url/ URL and title].
508[http://{{SERVERNAME}}/url/ URL and title].
510[http://{{SERVERNAME}}/url/ URL and title].
512[http://{{SERVERNAME}}/url/ URL and title]
514[http://{{SERVERNAME}}/url/ URL and title]
516[http://{{SERVERNAME}}/url/with_underscore with_underscore]
518[mailto:nobody@nowhere.net Email link]
520[http://{{SERVERNAME}}/ Empty].
522=== Reference ===
524Foo [http://{{SERVERNAME}}/url/ bar].
526Foo [http://{{SERVERNAME}}/url/ bar].
528Foo [http://{{SERVERNAME}}/url/ bar].
530With [http://{{SERVERNAME}}/url/ embedded [brackets]].
532[http://{{SERVERNAME}}/url/ b] by itself should be a link.
534Indented [http://{{SERVERNAME}}/url once].
536Indented [http://{{SERVERNAME}}/url twice].
538Indented [http://{{SERVERNAME}}/url thrice].
540This should [not][] be a link.
542<pre>[not]: /url</pre>
543Foo [http://{{SERVERNAME}}/url/ bar].
545Foo [http://{{SERVERNAME}}/url/ biz].
547=== With ampersands ===
549Here&rsquo;s a [http://example.com/?foo=1&bar=2 link with an ampersand in the URL].
551Here&rsquo;s a link with an amersand in the link text: [http://att.com/ AT&amp;T].
553Here&rsquo;s an [http://{{SERVERNAME}}/script?foo=1&bar=2 inline link].
555Here&rsquo;s an [http://{{SERVERNAME}}/script?foo=1&bar=2 inline link in pointy braces].
557=== Autolinks ===
559With an ampersand: http://example.com/?foo=1&bar=2
561* In a list?
562* http://example.com/
563* It should.
564An e-mail address: [mailto:nobody@nowhere.net <tt>nobody@nowhere.net</tt>]
566<blockquote>Blockquoted: http://example.com/
567</blockquote>
568Auto-links should not occur here: <tt>&lt;http://example.com/&gt;</tt>
570<pre>or here: &lt;http://example.com/&gt;</pre>
572-----
574== Images ==
576From &ldquo;Voyage dans la Lune&rdquo; by Georges Melies (1902):
578[[Image:lalune.jpg|Voyage dans la Lune]]
580Here is a movie [[Image:movie.jpg|movie]] icon.
583-----
585== Footnotes ==
587Here 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.
588</ref> and another.<ref>Here&rsquo;s the long note. This one contains multiple blocks.
590Subsequent blocks are indented to show that they belong to the footnote (as with list items).
592<pre> { &lt;code&gt; }</pre>
593If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
594</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].
595</ref>
597<blockquote>Notes can go in quotes.<ref>In quote.
598</ref>
599</blockquote>
600# And in list items.<ref>In list.</ref>
601This paragraph should not be part of the note, as it is not indented.
603== Notes ==
604<references />