git.iko.soy/typeable/pandoc
on rc/test4 help sign in
typeable/pandoc/test/writer.haddock
657 lines 9.8 kB history raw
1This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
2markdown test suite.
4______________________________________________________________________________
6= Headers
7#headers#
9== Level 2 with an </url embedded link>
10#level-2-with-an-embedded-link#
12=== Level 3 with /emphasis/
13#level-3-with-emphasis#
15==== Level 4
16#level-4#
18===== Level 5
19#level-5#
21= Level 1
22#level-1#
24== Level 2 with /emphasis/
25#level-2-with-emphasis#
27=== Level 3
28#level-3#
30with no blank line
32== Level 2
33#level-2#
35with no blank line
37______________________________________________________________________________
39= Paragraphs
40#paragraphs#
42Here’s a regular paragraph.
44In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
45Because a hard-wrapped line in the middle of a paragraph looked like a list
46item.
48Here’s one with a bullet. * criminey.
50There should be a hard line break
51here.
53______________________________________________________________________________
55= Block Quotes
56#block-quotes#
58E-mail style:
60This is a block quote. It is pretty short.
62Code in a block quote:
64> sub status {
65> print "working";
66> }
68A list:
701. item one
712. item two
73Nested block quotes:
75nested
77nested
79This should not be a block quote: 2 > 1.
81And a following paragraph.
83______________________________________________________________________________
85= Code Blocks
86#code-blocks#
88Code:
90> ---- (should be four hyphens)
92> sub status {
93> print "working";
94> }
96> this code block is indented by one tab
98And:
100> this code block is indented by two tabs
102> These should not be escaped: \$ \\ \> \[ \{
104______________________________________________________________________________
106= Lists
107#lists#
109== Unordered
110#unordered#
112Asterisks tight:
114- asterisk 1
115- asterisk 2
116- asterisk 3
118Asterisks loose:
120- asterisk 1
122- asterisk 2
124- asterisk 3
126Pluses tight:
128- Plus 1
129- Plus 2
130- Plus 3
132Pluses loose:
134- Plus 1
136- Plus 2
138- Plus 3
140Minuses tight:
142- Minus 1
143- Minus 2
144- Minus 3
146Minuses loose:
148- Minus 1
150- Minus 2
152- Minus 3
154== Ordered
155#ordered#
157Tight:
1591. First
1602. Second
1613. Third
163and:
1651. One
1662. Two
1673. Three
169Loose using tabs:
1711. First
1732. Second
1753. Third
177and using spaces:
1791. One
1812. Two
1833. Three
185Multiple paragraphs:
1871. Item 1, graf one.
189 Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
1912. Item 2.
1933. Item 3.
195== Nested
196#nested#
198- Tab
199 - Tab
200 - Tab
202Here’s another:
2041. First
2052. Second:
206 - Fee
207 - Fie
208 - Foe
2103. Third
212Same thing but with paragraphs:
2141. First
2162. Second:
218 - Fee
219 - Fie
220 - Foe
2223. Third
224== Tabs and spaces
225#tabs-and-spaces#
227- this is a list item indented with tabs
229- this is a list item indented with spaces
231 - this is an example list item indented with tabs
233 - this is an example list item indented with spaces
235== Fancy list markers
236#fancy-list-markers#
238(2) begins with 2
240(3) and now 3
242 with a continuation
244 4. sublist with roman numerals, starting with 4
245 5. more items
246 (1) a subsublist
247 (2) a subsublist
249Nesting:
2511. Upper Alpha
252 1. Upper Roman.
253 (6) Decimal start with 6
254 3) Lower alpha with paren
256Autonumbering:
2581. Autonumber.
2592. More.
260 1. Nested.
262Should not be a list item:
264M.A. 2007
266B. Williams
268______________________________________________________________________________
270= Definition Lists
271#definition-lists#
273Tight using spaces:
275[apple]
276 red fruit
277[orange]
278 orange fruit
279[banana]
280 yellow fruit
282Tight using tabs:
284[apple]
285 red fruit
286[orange]
287 orange fruit
288[banana]
289 yellow fruit
291Loose:
293[apple]
294 red fruit
296[orange]
297 orange fruit
299[banana]
300 yellow fruit
302Multiple blocks with italics:
304[/apple/]
305 red fruit
307 contains seeds, crisp, pleasant to taste
309[/orange/]
310 orange fruit
312 > { orange code block }
314 orange block quote
316Multiple definitions, tight:
318[apple]
319 red fruit
320 computer
321[orange]
322 orange fruit
323 bank
325Multiple definitions, loose:
327[apple]
328 red fruit
330 computer
332[orange]
333 orange fruit
335 bank
337Blank line after term, indented marker, alternate markers:
339[apple]
340 red fruit
342 computer
344[orange]
345 orange fruit
347 1. sublist
348 2. sublist
350= HTML Blocks
351#html-blocks#
353Simple block on one line:
355foo
357And nested without indentation:
359foo
361bar
363Interpreted markdown in a table:
365This is /emphasized/
366And this is __strong__
367Here’s a simple block:
369foo
371This should be a code block, though:
373> <div>
374> foo
375> </div>
377As should this:
379> <div>foo</div>
381Now, nested:
383foo
385This should just be an HTML comment:
387Multiline:
389Code block:
391> <!-- Comment -->
393Just plain comment, with trailing spaces on the line:
395Code:
397> <hr />
399Hr’s:
401______________________________________________________________________________
403= Inline Markup
404#inline-markup#
406This is /emphasized/, and so /is this/.
408This is __strong__, and so __is this__.
410An /</url emphasized link>/.
412__/This is strong and em./__
414So is __/this/__ word.
416__/This is strong and em./__
418So is __/this/__ word.
420This is code: @>@, @$@, @\\@, @\\$@, @\<html>@.
422~~This is /strikeout/.~~
424Superscripts: abcd a/hello/ ahello there.
426Subscripts: H2O, H23O, Hmany of themO.
428These should not be superscripts or subscripts, because of the unescaped
429spaces: a^b c^d, a~b c~d.
431______________________________________________________________________________
433= Smart quotes, ellipses, dashes
434#smart-quotes-ellipses-dashes#
436“Hello,” said the spider. “‘Shelob’ is my name.”
438‘A’, ‘B’, and ‘C’ are letters.
440‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
442‘He said, “I want to go.”’ Were you alive in the 70’s?
444Here is some quoted ‘@code@’ and a
445“<http://example.com/?foo=1&bar=2 quoted link>”.
447Some dashes: one—two — three—four — five.
449Dashes between numbers: 5–7, 255–66, 1987–1999.
451Ellipses…and…and….
453______________________________________________________________________________
455= LaTeX
456#latex#
458-
459- \(2+2=4\)
460- \(x \in y\)
461- \(\alpha \wedge \omega\)
462- \(223\)
463- \(p\)-Tree
464- Here’s some display math:
465 \[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]
466- Here’s one that has a line break in it: \(\alpha + \omega \times x^2\).
468These shouldn’t be math:
470- To get the famous equation, write @$e = mc^2$@.
471- $22,000 is a /lot/ of money. So is $34,000. (It worked if “lot” is
472 emphasized.)
473- Shoes ($20) and socks ($5).
474- Escaped @$@: $73 /this should be emphasized/ 23$.
476Here’s a LaTeX table:
478______________________________________________________________________________
480= Special Characters
481#special-characters#
483Here is some unicode:
485- I hat: Î
486- o umlaut: ö
487- section: §
488- set membership: ∈
489- copyright: ©
491AT&T has an ampersand in their name.
493AT&T is another way to write it.
495This & that.
4974 \< 5.
4996 > 5.
501Backslash: \\
503Backtick: \`
505Asterisk: *
507Underscore: _
509Left brace: {
511Right brace: }
513Left bracket: [
515Right bracket: ]
517Left paren: (
519Right paren: )
521Greater-than: >
523Hash: #
525Period: .
527Bang: !
529Plus: +
531Minus: -
533______________________________________________________________________________
535= Links
536#links#
538== Explicit
539#explicit#
541Just a </url/ URL>.
543</url/ URL and title>.
545</url/ URL and title>.
547</url/ URL and title>.
549</url/ URL and title>
551</url/ URL and title>
553</url/with_underscore with_underscore>
555<mailto:nobody@nowhere.net Email link>
557< Empty>.
559== Reference
560#reference#
562Foo </url/ bar>.
564With </url/ embedded [brackets]>.
566</url/ b> by itself should be a link.
568Indented </url once>.
570Indented </url twice>.
572Indented </url thrice>.
574This should [not][] be a link.
576> [not]: /url
578Foo </url/ bar>.
580Foo </url/ biz>.
582== With ampersands
583#with-ampersands#
585Here’s a <http://example.com/?foo=1&bar=2 link with an ampersand in the URL>.
587Here’s a link with an amersand in the link text: <http://att.com/ AT&T>.
589Here’s an </script?foo=1&bar=2 inline link>.
591Here’s an </script?foo=1&bar=2 inline link in pointy braces>.
593== Autolinks
594#autolinks#
596With an ampersand: <http://example.com/?foo=1&bar=2>
598- In a list?
599- <http://example.com/>
600- It should.
602An e-mail address: <mailto:nobody@nowhere.net nobody\@nowhere.net>
604Blockquoted: <http://example.com/>
606Auto-links should not occur here: @\<http:\/\/example.com\/>@
608> or here: <http://example.com/>
610______________________________________________________________________________
612= Images
613#images#
615From “Voyage dans la Lune” by Georges Melies (1902):
617<<lalune.jpg lalune>>
619Here is a movie <<movie.jpg movie>> icon.
621______________________________________________________________________________
623= Footnotes
624#footnotes#
626Here is a footnote reference,<#notes [1]> and another.<#notes [2]> This should
627/not/ be a footnote reference, because it contains a space.[^my note] Here is
628an inline note.<#notes [3]>
630Notes can go in quotes.<#notes [4]>
6321. And in list items.<#notes [5]>
634This paragraph should not be part of the note, as it is not indented.
636#notes#
6381. Here is the footnote. It can go anywhere after the footnote reference. It
639 need not be placed at the end of the document.
6412. Here’s the long note. This one contains multiple blocks.
643 Subsequent blocks are indented to show that they belong to the footnote
644 (as with list items).
646 > { <code> }
648 If you want, you can indent every line, but you can also be lazy and just
649 indent the first line of each block.
6513. This is /easier/ to type. Inline notes may contain
652 <http://google.com links> and @]@ verbatim characters, as well as
653 [bracketed text].
6554. In quote.
6575. In list.