begin document title
Pandoc Test Suite
end document title
begin document authors
John MacFarlane
Anonymous
end document authors
begin document date
July 17
2006
end document date
This is a set of tests for pandoc
Most of them are adapted from John Gruber’s markdown test suite
horizontal rule
begin header level
1
Headers
end header level
1
begin header level
2
Level 2 with an
begin link
embedded link
/url
end link
end header level
2
begin header level
3
Level 3 with
emphasis
end header level
3
begin header level
4
Level 4
end header level
4
begin header level
5
Level 5
end header level
5
begin header level
1
Level 1
end header level
1
begin header level
2
Level 2 with
emphasis
end header level
2
begin header level
3
Level 3
end header level
3
with no blank line
begin header level
2
Level 2
end header level
2
with no blank line
horizontal rule
begin header level
1
Paragraphs
end header level
1
Here’s a regular paragraph
In 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
Here’s one with a bullet
* criminey
There should be a hard line break
line break
here
horizontal rule
begin header level
1
Block Quotes
end header level
1
E-mail style
begin quote
This is a block quote
It is pretty short
end quote
begin quote
Code in a block quote
begin code
sub
space
status
space
{
newline
space
space
space
space
print
space
"working";
newline
}
end code
A list
begin list
1
item one
2
item two
end list
Nested block quotes
begin quote
nested
end quote
begin quote
nested
end quote
end quote
This should not be a block quote
2 > 1
And a following paragraph
horizontal rule
begin header level
1
Code Blocks
end header level
1
Code
begin code
----
space
(should
space
be
space
four
space
hyphens)
newline
newline
sub
space
status
space
{
newline
space
space
space
space
print
space
"working";
newline
}
newline
newline
this
space
code
space
block
space
is
space
indented
space
by
space
one
space
tab
end code
And
begin code
space
space
space
space
this
space
code
space
block
space
is
space
indented
space
by
space
two
space
tabs
newline
newline
These
space
should
space
not
space
be
space
escaped:
space
space
\$
space
\\
space
\>
space
\[
space
\{
end code
horizontal rule
begin header level
1
Lists
end header level
1
begin header level
2
Unordered
end header level
2
Asterisks tight
begin list
1
asterisk 1
2
asterisk 2
3
asterisk 3
end list
Asterisks loose
begin list
1
asterisk 1
2
asterisk 2
3
asterisk 3
end list
Pluses tight
begin list
1
Plus 1
2
Plus 2
3
Plus 3
end list
Pluses loose
begin list
1
Plus 1
2
Plus 2
3
Plus 3
end list
Minuses tight
begin list
1
Minus 1
2
Minus 2
3
Minus 3
end list
Minuses loose
begin list
1
Minus 1
2
Minus 2
3
Minus 3
end list
begin header level
2
Ordered
end header level
2
Tight
begin list
1
First
2
Second
3
Third
end list
and
begin list
1
One
2
Two
3
Three
end list
Loose using tabs
begin list
1
First
2
Second
3
Third
end list
and using spaces
begin list
1
One
2
Two
3
Three
end list
Multiple paragraphs
begin list
1
Item 1
graf one
Item 1
graf two
The quick brown fox jumped over the lazy dog’s back
2
Item 2
3
Item 3
end list
begin header level
2
Nested
end header level
2
begin list
1
Tab
begin list
1
Tab
begin list
1
Tab
end list
end list
end list
Here’s another
begin list
1
First
2
Second
begin list
1
Fee
2
Fie
3
Foe
end list
3
Third
end list
Same thing but with paragraphs
begin list
1
First
2
Second
begin list
1
Fee
2
Fie
3
Foe
end list
3
Third
end list
begin header level
2
Tabs and spaces
end header level
2
begin list
1
this is a list item indented with tabs
2
this is a list item indented with spaces
begin list
1
this is an example list item indented with tabs
2
this is an example list item indented with spaces
end list
end list
begin header level
2
Fancy list markers
end header level
2
begin list
1
begins with 2
2
and now 3
with a continuation
begin list
1
sublist with roman numerals
starting with 4
2
more items
begin list
'A'
a subsublist
'B'
a subsublist
end list
end list
end list
Nesting
begin list
'A'
Upper Alpha
begin list
1
Upper Roman
begin list
1
Decimal start with 6
begin list
'a'
Lower alpha with paren
end list
end list
end list
end list
Autonumbering
begin list
1
Autonumber
2
More
begin list
1
Nested
end list
end list
Should not be a list item
M.A. 2007
B
Williams
horizontal rule
begin header level
1
Definition Lists
end header level
1
Tight using spaces
begin definition list
apple
red fruit
orange
orange fruit
banana
yellow fruit
end definition list
Tight using tabs
begin definition list
apple
red fruit
orange
orange fruit
banana
yellow fruit
end definition list
Loose
begin definition list
apple
red fruit
orange
orange fruit
banana
yellow fruit
end definition list
Multiple blocks with italics
begin definition list
apple
red fruit
contains seeds
crisp
pleasant to taste
orange
orange fruit
begin code
{
space
orange
space
code
space
block
space
}
end code
begin quote
orange block quote
end quote
end definition list
Multiple definitions
tight
begin definition list
apple
red fruit
computer
orange
orange fruit
bank
end definition list
Multiple definitions
loose
begin definition list
apple
red fruit
computer
orange
orange fruit
bank
end definition list
Blank line after term
indented marker
alternate markers
begin definition list
apple
red fruit
computer
orange
orange fruit
begin list
1
sublist
2
sublist
end list
end definition list
begin header level
1
HTML Blocks
end header level
1
Simple block on one line
foo
And nested without indentation
foo
bar
Interpreted markdown in a table
begin raw html
<table>
newline
<tr>
newline
<td>
end raw html
This is
emphasized
begin raw html
</td>
newline
<td>
end raw html
And this is
strong
begin raw html
</td>
newline
</tr>
newline
</table>
newline
newline
<script
space
type="text/javascript">document.write('This
space
*should
space
not*
space
be
space
interpreted
space
as
space
markdown');</script>
newline
end raw html
Here’s a simple block
foo
This should be a code block
though
begin code
<div>
newline
space
space
space
space
foo
newline
</div>
end code
As should this
begin code
<div>foo</div>
end code
Now
nested
foo
This should just be an HTML comment
begin raw html
<!--
space
Comment
space
-->
newline
end raw html
Multiline
begin raw html
<!--
newline
Blah
newline
Blah
newline
-->
newline
newline
<!--
newline
space
space
space
space
This
space
is
space
another
space
comment.
newline
-->
newline
end raw html
Code block
begin code
<!--
space
Comment
space
-->
end code
Just plain comment
with trailing spaces on the line
begin raw html
<!--
space
foo
space
-->
space
space
space
newline
end raw html
Code
begin code
<hr
space
/>
end code
Hr’s
begin raw html
<hr>
newline
newline
<hr
space
/>
newline
newline
<hr
space
/>
newline
newline
<hr>
space
space
space
newline
newline
<hr
space
/>
space
space
newline
newline
<hr
space
/>
space
newline
newline
<hr
space
class="foo"
space
id="bar"
space
/>
newline
newline
<hr
space
class="foo"
space
id="bar"
space
/>
newline
newline
<hr
space
class="foo"
space
id="bar">
newline
end raw html
horizontal rule
begin header level
1
Inline Markup
end header level
1
This is
emphasized
and so
is this
This is
strong
and so
is this
An
begin link
emphasized link
/url
end link
This is strong and em
So is
this
word
This is strong and em
So is
this
word
This is code
begin code
>
end code
begin code
$
end code
begin code
\
end code
begin code
\$
end code
begin code
<html>
end code
begin strikeout
This is
strikeout
end strikeout
Superscripts
a
begin superscript
bc
end superscript
d a
begin superscript
hello
end superscript
a
begin superscript
hello there
end superscript
Subscripts
H
begin subscript
2
end subscript
O
H
begin subscript
23
end subscript
O
H
begin subscript
many of them
end subscript
O
These should not be superscripts or subscripts
because of the unescaped spaces
a^b c^d
a~b c~d
horizontal rule
begin header level
1
Smart quotes
ellipses
dashes
end header level
1
begin double quote
Hello
end double quote
said the spider
begin double quote
begin single quote
Shelob
end single quote
is my name
end double quote
begin single quote
A
end single quote
begin single quote
B
end single quote
and
begin single quote
C
end single quote
are letters
begin single quote
Oak
end single quote
begin single quote
elm
end single quote
and
begin single quote
beech
end single quote
are names of trees
So is
begin single quote
pine
end single quote
begin single quote
He said
begin double quote
I want to go
end double quote
end single quote
Were you alive in the 70’s
Here is some quoted
begin single quote
begin code
code
end code
end single quote
and a
begin double quote
begin link
quoted link
http://example.com/?foo=1&bar=2
end link
end double quote
Some dashes
one—two — three—four — five
Dashes between numbers
5–7
255–66
1987–1999
Ellipses…and…and…
horizontal rule
begin header level
1
LaTeX
end header level
1
begin list
1
begin raw tex
\cite[22-23]{smith.1899}
end raw tex
2
2+2=4 3
x \in y 4
\alpha \wedge \omega 5
223 6
p
-Tree
7
Here’s some display math
\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} 8
Here’s one that has a line break in it
\alpha + \omega \times x^2
end list
These shouldn’t be math
begin list
1
To get the famous equation
write
begin code
$e
space
=
space
mc^2$
end code
2
$22,000 is a
lot
of money
So is $34,000
(It worked if
begin double quote
lot
end double quote
is emphasized.)
3
Shoes ($20) and socks ($5)
4
Escaped
begin code
$
end code
$73
this should be emphasized
23$
end list
Here’s a LaTeX table
begin raw latex
\begin{tabular}{|l|l|}\hline
newline
Animal
space
&
space
Number
space
\\
space
\hline
newline
Dog
space
space
space
space
&
space
2
space
space
space
space
space
space
\\
newline
Cat
space
space
space
space
&
space
1
space
space
space
space
space
space
\\
space
\hline
newline
\end{tabular}
end raw latex
horizontal rule
begin header level
1
Special Characters
end header level
1
Here is some unicode
begin list
1
I hat
Î
2
o umlaut
ö
3
section
§
4
set membership
5
copyright
©
end list
AT&T has an ampersand in their name
AT&T is another way to write it
This & that
4 < 5
6 > 5
Backslash
\
Backtick
`
Asterisk
*
Underscore
_
Left brace
{
Right brace
}
Left bracket
[
Right bracket
]
Left paren
(
Right paren
)
Greater-than
>
Hash
#
Period
Bang
Plus
+
Minus
-
horizontal rule
begin header level
1
Links
end header level
1
begin header level
2
Explicit
end header level
2
Just a
begin link
URL
/url/
end link
begin link
URL and title
/url/
end link
begin link
URL and title
/url/
end link
begin link
URL and title
/url/
end link
begin link
URL and title
/url/
end link
begin link
URL and title
/url/
end link
begin link
with_underscore
/url/with_underscore
end link
begin link
Email link
mailto:nobody@nowhere.net
end link
begin link
Empty
end link
begin header level
2
Reference
end header level
2
Foo
begin link
bar
/url/
end link
Foo
begin link
bar
/url/
end link
Foo
begin link
bar
/url/
end link
With
begin link
embedded [brackets]
/url/
end link
begin link
b
/url/
end link
by itself should be a link
Indented
begin link
once
/url
end link
Indented
begin link
twice
/url
end link
Indented
begin link
thrice
/url
end link
This should [not][] be a link
begin code
[not]:
space
/url
end code
Foo
begin link
bar
/url/
end link
Foo
begin link
biz
/url/
end link
begin header level
2
With ampersands
end header level
2
Here’s a
begin link
link with an ampersand in the URL
http://example.com/?foo=1&bar=2
end link
Here’s a link with an amersand in the link text
begin link
AT&T
http://att.com/
end link
Here’s an
begin link
inline link
/script?foo=1&bar=2
end link
Here’s an
begin link
inline link in pointy braces
/script?foo=1&bar=2
end link
begin header level
2
Autolinks
end header level
2
With an ampersand
begin link
http://example.com/?foo=1&bar=2
http://example.com/?foo=1&bar=2
end link
begin list
1
In a list
2
begin link
http://example.com/
http://example.com/
end link
3
It should
end list
An e-mail address
begin link
nobody@nowhere.net
mailto:nobody@nowhere.net
end link
begin quote
Blockquoted
begin link
http://example.com/
http://example.com/
end link
end quote
Auto-links should not occur here
begin code
<http://example.com/>
end code
begin code
or
space
here:
space
<http://example.com/>
end code
horizontal rule
begin header level
1
Images
end header level
1
From
begin double quote
Voyage dans la Lune
end double quote
by Georges Melies (1902)
begin image
lalune
lalune.jpg
end image
Here is a movie
begin image
movie
movie.jpg
end image
icon
horizontal rule
begin header level
1
Footnotes
end header level
1
Here is a footnote reference
begin note
Here is the footnote
It can go anywhere after the footnote reference
It need not be placed at the end of the document
end note
and another
begin note
Here’s the long note
This one contains multiple blocks
Subsequent blocks are indented to show that they belong to the footnote (as with list items)
begin code
space
space
{
space
<code>
space
}
end code
If you want
you can indent every line
but you can also be lazy and just indent the first line of each block
end note
This should
not
be a footnote reference
because it contains a space.[^my note] Here is an inline note
begin note
This is
easier
to type
Inline notes may contain
begin link
links
http://google.com
end link
and
begin code
]
end code
verbatim characters
as well as [bracketed text]
end note
begin quote
Notes can go in quotes
begin note
In quote
end note
end quote
begin list
1
And in list items
begin note
In list
end note
end list
This paragraph should not be part of the note
as it is not indented