git.iko.soy/typeable/pandoc
on 1.15.2.1 help sign in
typeable/pandoc/tests/writer.haddock
660 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
239(3) and now 3
241 with a continuation
243 4. sublist with roman numerals, starting with 4
244 5. more items
245 (1) a subsublist
246 (2) a subsublist
248Nesting:
2501. Upper Alpha
251 1. Upper Roman.
252 (6) Decimal start with 6
253 3) Lower alpha with paren
255Autonumbering:
2571. Autonumber.
2582. More.
259 1. Nested.
261Should not be a list item:
263M.A. 2007
265B. Williams
267______________________________________________________________________________
269= Definition Lists
270#definition-lists#
272Tight using spaces:
274[apple]
275 red fruit
276[orange]
277 orange fruit
278[banana]
279 yellow fruit
281Tight using tabs:
283[apple]
284 red fruit
285[orange]
286 orange fruit
287[banana]
288 yellow fruit
290Loose:
292[apple]
293 red fruit
295[orange]
296 orange fruit
298[banana]
299 yellow fruit
301Multiple blocks with italics:
303[/apple/]
304 red fruit
306 contains seeds, crisp, pleasant to taste
308[/orange/]
309 orange fruit
311 > { orange code block }
313 orange block quote
315Multiple definitions, tight:
317[apple]
318 red fruit
319 computer
320[orange]
321 orange fruit
322 bank
324Multiple definitions, loose:
326[apple]
327 red fruit
329 computer
331[orange]
332 orange fruit
334 bank
336Blank line after term, indented marker, alternate markers:
338[apple]
339 red fruit
341 computer
343[orange]
344 orange fruit
346 1. sublist
347 2. sublist
349= HTML Blocks
350#html-blocks#
352Simple block on one line:
354foo
356And nested without indentation:
358foo
360bar
362Interpreted markdown in a table:
364This is /emphasized/
365And this is __strong__
366Here’s a simple block:
368foo
370This should be a code block, though:
372> <div>
373> foo
374> </div>
376As should this:
378> <div>foo</div>
380Now, nested:
382foo
384This should just be an HTML comment:
386Multiline:
388Code block:
390> <!-- Comment -->
392Just plain comment, with trailing spaces on the line:
394Code:
396> <hr />
398Hr’s:
400______________________________________________________________________________
402= Inline Markup
403#inline-markup#
405This is /emphasized/, and so /is this/.
407This is __strong__, and so __is this__.
409An /</url emphasized link>/.
411__/This is strong and em./__
413So is __/this/__ word.
415__/This is strong and em./__
417So is __/this/__ word.
419This is code: @>@, @$@, @\\@, @\\$@, @\<html>@.
421~~This is /strikeout/.~~
423Superscripts: abcd a/hello/ ahello there.
425Subscripts: H2O, H23O, Hmany of themO.
427These should not be superscripts or subscripts, because of the unescaped
428spaces: a^b c^d, a~b c~d.
430______________________________________________________________________________
432= Smart quotes, ellipses, dashes
433#smart-quotes-ellipses-dashes#
435“Hello,” said the spider. “‘Shelob’ is my name.”
437‘A’, ‘B’, and ‘C’ are letters.
439‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
441‘He said, “I want to go.”’ Were you alive in the 70’s?
443Here is some quoted ‘@code@’ and a
444“<http://example.com/?foo=1&bar=2 quoted link>”.
446Some dashes: one—two — three—four — five.
448Dashes between numbers: 5–7, 255–66, 1987–1999.
450Ellipses…and…and….
452______________________________________________________________________________
454= LaTeX
455#latex#
457-
458- 2 + 2 = 4
459- /x/ ∈ /y/
460- /α/ ∧ /ω/
461- 223
462- /p/-Tree
463- Here’s some display math:
464 $$\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}$$
465- Here’s one that has a line break in it: /α/ + /ω/ × /x/2.
467These shouldn’t be math:
469- To get the famous equation, write @$e = mc^2$@.
470- $22,000 is a /lot/ of money. So is $34,000. (It worked if “lot” is
471 emphasized.)
472- Shoes ($20) and socks ($5).
473- Escaped @$@: $73 /this should be emphasized/ 23$.
475Here’s a LaTeX table:
477______________________________________________________________________________
479= Special Characters
480#special-characters#
482Here is some unicode:
484- I hat: Î
485- o umlaut: ö
486- section: §
487- set membership: ∈
488- copyright: ©
490AT&T has an ampersand in their name.
492AT&T is another way to write it.
494This & that.
4964 \< 5.
4986 > 5.
500Backslash: \\
502Backtick: \`
504Asterisk: *
506Underscore: _
508Left brace: {
510Right brace: }
512Left bracket: [
514Right bracket: ]
516Left paren: (
518Right paren: )
520Greater-than: >
522Hash: #
524Period: .
526Bang: !
528Plus: +
530Minus: -
532______________________________________________________________________________
534= Links
535#links#
537== Explicit
538#explicit#
540Just a </url/ URL>.
542</url/ URL and title>.
544</url/ URL and title>.
546</url/ URL and title>.
548</url/ URL and title>
550</url/ URL and title>
552</url/with_underscore with_underscore>
554<mailto:nobody@nowhere.net Email link>
556< Empty>.
558== Reference
559#reference#
561Foo </url/ bar>.
563Foo </url/ bar>.
565Foo </url/ bar>.
567With </url/ embedded [brackets]>.
569</url/ b> by itself should be a link.
571Indented </url once>.
573Indented </url twice>.
575Indented </url thrice>.
577This should [not][] be a link.
579> [not]: /url
581Foo </url/ bar>.
583Foo </url/ biz>.
585== With ampersands
586#with-ampersands#
588Here’s a <http://example.com/?foo=1&bar=2 link with an ampersand in the URL>.
590Here’s a link with an amersand in the link text: <http://att.com/ AT&T>.
592Here’s an </script?foo=1&bar=2 inline link>.
594Here’s an </script?foo=1&bar=2 inline link in pointy braces>.
596== Autolinks
597#autolinks#
599With an ampersand: <http://example.com/?foo=1&bar=2>
601- In a list?
602- <http://example.com/>
603- It should.
605An e-mail address: <mailto:nobody@nowhere.net nobody\@nowhere.net>
607Blockquoted: <http://example.com/>
609Auto-links should not occur here: @\<http:\/\/example.com\/>@
611> or here: <http://example.com/>
613______________________________________________________________________________
615= Images
616#images#
618From “Voyage dans la Lune” by Georges Melies (1902):
620<<lalune.jpg lalune>>
622Here is a movie <<movie.jpg movie>> icon.
624______________________________________________________________________________
626= Footnotes
627#footnotes#
629Here is a footnote reference,<#notes [1]> and another.<#notes [2]> This should
630/not/ be a footnote reference, because it contains a space.[^my note] Here is
631an inline note.<#notes [3]>
633Notes can go in quotes.<#notes [4]>
6351. And in list items.<#notes [5]>
637This paragraph should not be part of the note, as it is not indented.
639#notes#
6411. Here is the footnote. It can go anywhere after the footnote reference. It
642 need not be placed at the end of the document.
6442. Here’s the long note. This one contains multiple blocks.
646 Subsequent blocks are indented to show that they belong to the footnote
647 (as with list items).
649 > { <code> }
651 If you want, you can indent every line, but you can also be lazy and just
652 indent the first line of each block.
6543. This is /easier/ to type. Inline notes may contain
655 <http://google.com links> and @]@ verbatim characters, as well as
656 [bracketed text].
6584. In quote.
6605. In list.