aboutsummaryrefslogtreecommitdiff
path: root/tests/writer.plain
diff options
context:
space:
mode:
Diffstat (limited to 'tests/writer.plain')
-rw-r--r--tests/writer.plain202
1 files changed, 121 insertions, 81 deletions
diff --git a/tests/writer.plain b/tests/writer.plain
index 60e7bb329..bd1a06998 100644
--- a/tests/writer.plain
+++ b/tests/writer.plain
@@ -5,39 +5,43 @@ July 17, 2006
This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
markdown test suite.
-* * * * *
+------------------------------------------------------------------------------
+
+
Headers
-=======
+
Level 2 with an embedded link
------------------------------
-Level 3 with emphasis
+Level 3 with _emphasis_
Level 4
Level 5
+
+
Level 1
-=======
-Level 2 with emphasis
----------------------
+
+Level 2 with _emphasis_
Level 3
with no blank line
+
Level 2
--------
with no blank line
-* * * * *
+------------------------------------------------------------------------------
+
+
Paragraphs
-==========
+
Here’s a regular paragraph.
@@ -47,13 +51,15 @@ item.
Here’s one with a bullet. * criminey.
-There should be a hard line break
+There should be a hard line break
here.
-* * * * *
+------------------------------------------------------------------------------
+
+
Block Quotes
-============
+
E-mail style:
@@ -80,10 +86,12 @@ This should not be a block quote: 2 > 1.
And a following paragraph.
-* * * * *
+------------------------------------------------------------------------------
+
+
Code Blocks
-===========
+
Code:
@@ -101,13 +109,14 @@ And:
These should not be escaped: \$ \\ \> \[ \{
-* * * * *
+------------------------------------------------------------------------------
+
+
Lists
-=====
+
Unordered
----------
Asterisks tight:
@@ -151,8 +160,8 @@ Minuses loose:
- Minus 3
+
Ordered
--------
Tight:
@@ -192,8 +201,8 @@ Multiple paragraphs:
3. Item 3.
+
Nested
-------
- Tab
- Tab
@@ -221,8 +230,8 @@ Same thing but with paragraphs:
3. Third
+
Tabs and spaces
----------------
- this is a list item indented with tabs
@@ -232,8 +241,8 @@ Tabs and spaces
- this is an example list item indented with spaces
+
Fancy list markers
-------------------
(2) begins with 2
(3) and now 3
@@ -264,17 +273,21 @@ M.A. 2007
B. Williams
-* * * * *
+------------------------------------------------------------------------------
+
+
Definition Lists
-================
+
Tight using spaces:
apple
red fruit
+
orange
orange fruit
+
banana
yellow fruit
@@ -282,30 +295,37 @@ Tight using tabs:
apple
red fruit
+
orange
orange fruit
+
banana
yellow fruit
Loose:
apple
+
red fruit
orange
+
orange fruit
banana
+
yellow fruit
Multiple blocks with italics:
-apple
+_apple_
+
red fruit
contains seeds, crisp, pleasant to taste
-orange
+_orange_
+
orange fruit
{ orange code block }
@@ -317,6 +337,7 @@ Multiple definitions, tight:
apple
red fruit
computer
+
orange
orange fruit
bank
@@ -324,11 +345,13 @@ orange
Multiple definitions, loose:
apple
+
red fruit
computer
orange
+
orange fruit
bank
@@ -336,18 +359,22 @@ orange
Blank line after term, indented marker, alternate markers:
apple
+
red fruit
computer
orange
+
orange fruit
1. sublist
2. sublist
+
+
HTML Blocks
-===========
+
Simple block on one line:
@@ -361,8 +388,8 @@ bar
Interpreted markdown in a table:
-This is emphasized
-And this is strong
+This is _emphasized_
+And this is STRONG
Here’s a simple block:
foo
@@ -397,40 +424,44 @@ Code:
Hr’s:
-* * * * *
+------------------------------------------------------------------------------
+
+
Inline Markup
-=============
-This is emphasized, and so is this.
-This is strong, and so is this.
+This is _emphasized_, and so _is this_.
+
+This is STRONG, and so IS THIS.
-An emphasized link.
+An _emphasized link_.
-This is strong and em.
+_THIS IS STRONG AND EM._
-So is this word.
+So is _THIS_ word.
-This is strong and em.
+_THIS IS STRONG AND EM._
-So is this word.
+So is _THIS_ word.
This is code: >, $, \, \$, <html>.
-This is strikeout.
+~~This is _strikeout_.~~
-Superscripts: abcd ahello ahello there.
+Superscripts: a^bc^d a^_hello_^ a^hello there^.
-Subscripts: H2O, H23O, Hmany of themO.
+Subscripts: H~2~O, H~23~O, H~many of them~O.
These should not be superscripts or subscripts, because of the unescaped
spaces: a^b c^d, a~b c~d.
-* * * * *
+------------------------------------------------------------------------------
+
+
Smart quotes, ellipses, dashes
-==============================
+
“Hello,” said the spider. “‘Shelob’ is my name.”
@@ -448,35 +479,39 @@ Dashes between numbers: 5–7, 255–66, 1987–1999.
Ellipses…and…and….
-* * * * *
+------------------------------------------------------------------------------
+
+
LaTeX
-=====
--
-- 2+2=4
-- x \in y
-- \alpha \wedge \omega
+
+- \cite[22-23]{smith.1899}
+- 2 + 2 = 4
+- x ∈ y
+- α ∧ ω
- 223
- p-Tree
- Here’s some display math:
- \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
-- Here’s one that has a line break in it: \alpha + \omega \times x^2.
+ $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
+- Here’s one that has a line break in it: α + ω × x^2^.
These shouldn’t be math:
- To get the famous equation, write $e = mc^2$.
-- $22,000 is a lot of money. So is $34,000. (It worked if “lot” is
+- $22,000 is a _lot_ of money. So is $34,000. (It worked if “lot” is
emphasized.)
- Shoes ($20) and socks ($5).
-- Escaped $: $73 this should be emphasized 23$.
+- Escaped $: $73 _this should be emphasized_ 23$.
Here’s a LaTeX table:
-* * * * *
+------------------------------------------------------------------------------
+
+
Special Characters
-==================
+
Here is some unicode:
@@ -528,13 +563,14 @@ Plus: +
Minus: -
-* * * * *
+------------------------------------------------------------------------------
+
+
Links
-=====
+
Explicit
---------
Just a URL.
@@ -554,8 +590,8 @@ Email link
Empty.
+
Reference
----------
Foo bar.
@@ -581,8 +617,8 @@ Foo bar.
Foo biz.
+
With ampersands
----------------
Here’s a link with an ampersand in the URL.
@@ -592,8 +628,8 @@ Here’s an inline link.
Here’s an inline link in pointy braces.
+
Autolinks
----------
With an ampersand: http://example.com/?foo=1&bar=2
@@ -609,10 +645,12 @@ Auto-links should not occur here: <http://example.com/>
or here: <http://example.com/>
-* * * * *
+------------------------------------------------------------------------------
+
+
Images
-======
+
From “Voyage dans la Lune” by Georges Melies (1902):
@@ -620,37 +658,39 @@ From “Voyage dans la Lune” by Georges Melies (1902):
Here is a movie [movie] icon.
-* * * * *
+------------------------------------------------------------------------------
+
+
Footnotes
-=========
-Here is a footnote reference,[^1] and another.[^2] This should not be a
+
+Here is a footnote reference,[1] and another.[2] This should _not_ be a
footnote reference, because it contains a space.[^my note] Here is an inline
-note.[^3]
+note.[3]
- Notes can go in quotes.[^4]
+ Notes can go in quotes.[4]
-1. And in list items.[^5]
+1. And in list items.[5]
This paragraph should not be part of the note, as it is not indented.
-[^1]: Here is the footnote. It can go anywhere after the footnote reference.
- It need not be placed at the end of the document.
+[1] Here is the footnote. It can go anywhere after the footnote reference. It
+need not be placed at the end of the document.
-[^2]: Here’s the long note. This one contains multiple blocks.
+[2] 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).
+Subsequent blocks are indented to show that they belong to the footnote (as
+with list items).
- { <code> }
+ { <code> }
- If you want, you can indent every line, but you can also be lazy and just
- indent the first line of each block.
+If you want, you can indent every line, but you can also be lazy and just
+indent the first line of each block.
-[^3]: This is easier to type. Inline notes may contain links and ] verbatim
- characters, as well as [bracketed text].
+[3] This is _easier_ to type. Inline notes may contain links and ] verbatim
+characters, as well as [bracketed text].
-[^4]: In quote.
+[4] In quote.
-[^5]: In list.
+[5] In list.