writer.org (pandoc-2.11.1.1) | : | writer.org (pandoc-2.11.2) | ||
---|---|---|---|---|
#+TITLE: Pandoc Test Suite | #+title: Pandoc Test Suite | |||
#+AUTHOR: John MacFarlane; Anonymous | #+author: John MacFarlane; Anonymous | |||
#+DATE: July 17, 2006 | #+date: July 17, 2006 | |||
This is a set of tests for pandoc. Most of them are adapted from John Gruber's | This is a set of tests for pandoc. Most of them are adapted from John Gruber's | |||
markdown test suite. | markdown test suite. | |||
-------------- | -------------- | |||
* Headers | * Headers | |||
:PROPERTIES: | :PROPERTIES: | |||
:CUSTOM_ID: headers | :CUSTOM_ID: headers | |||
:END: | :END: | |||
skipping to change at line 76 | skipping to change at line 76 | |||
here. | here. | |||
-------------- | -------------- | |||
* Block Quotes | * Block Quotes | |||
:PROPERTIES: | :PROPERTIES: | |||
:CUSTOM_ID: block-quotes | :CUSTOM_ID: block-quotes | |||
:END: | :END: | |||
E-mail style: | E-mail style: | |||
#+BEGIN_QUOTE | #+begin_quote | |||
This is a block quote. It is pretty short. | This is a block quote. It is pretty short. | |||
#+END_QUOTE | #+end_quote | |||
#+BEGIN_QUOTE | #+begin_quote | |||
Code in a block quote: | Code in a block quote: | |||
#+BEGIN_EXAMPLE | #+begin_example | |||
sub status { | sub status { | |||
print "working"; | print "working"; | |||
} | } | |||
#+END_EXAMPLE | #+end_example | |||
A list: | A list: | |||
1. item one | 1. item one | |||
2. item two | 2. item two | |||
Nested block quotes: | Nested block quotes: | |||
#+BEGIN_QUOTE | #+begin_quote | |||
nested | nested | |||
#+END_QUOTE | #+end_quote | |||
#+BEGIN_QUOTE | #+begin_quote | |||
nested | nested | |||
#+END_QUOTE | #+end_quote | |||
#+END_QUOTE | #+end_quote | |||
This should not be a block quote: 2 > 1. | This should not be a block quote: 2 > 1. | |||
And a following paragraph. | And a following paragraph. | |||
-------------- | -------------- | |||
* Code Blocks | * Code Blocks | |||
:PROPERTIES: | :PROPERTIES: | |||
:CUSTOM_ID: code-blocks | :CUSTOM_ID: code-blocks | |||
:END: | :END: | |||
Code: | Code: | |||
#+BEGIN_EXAMPLE | #+begin_example | |||
---- (should be four hyphens) | ---- (should be four hyphens) | |||
sub status { | sub status { | |||
print "working"; | print "working"; | |||
} | } | |||
this code block is indented by one tab | this code block is indented by one tab | |||
#+END_EXAMPLE | #+end_example | |||
And: | And: | |||
#+BEGIN_EXAMPLE | #+begin_example | |||
this code block is indented by two tabs | this code block is indented by two tabs | |||
These should not be escaped: \$ \\ \> \[ \{ | These should not be escaped: \$ \\ \> \[ \{ | |||
#+END_EXAMPLE | #+end_example | |||
-------------- | -------------- | |||
* Lists | * Lists | |||
:PROPERTIES: | :PROPERTIES: | |||
:CUSTOM_ID: lists | :CUSTOM_ID: lists | |||
:END: | :END: | |||
** Unordered | ** Unordered | |||
:PROPERTIES: | :PROPERTIES: | |||
:CUSTOM_ID: unordered | :CUSTOM_ID: unordered | |||
skipping to change at line 350 | skipping to change at line 350 | |||
- banana :: yellow fruit | - banana :: yellow fruit | |||
Multiple blocks with italics: | Multiple blocks with italics: | |||
- /apple/ :: red fruit | - /apple/ :: red fruit | |||
contains seeds, crisp, pleasant to taste | contains seeds, crisp, pleasant to taste | |||
- /orange/ :: orange fruit | - /orange/ :: orange fruit | |||
#+BEGIN_EXAMPLE | #+begin_example | |||
{ orange code block } | { orange code block } | |||
#+END_EXAMPLE | #+end_example | |||
#+BEGIN_QUOTE | #+begin_quote | |||
orange block quote | orange block quote | |||
#+END_QUOTE | #+end_quote | |||
Multiple definitions, tight: | Multiple definitions, tight: | |||
- apple :: red fruit | - apple :: red fruit | |||
computer | computer | |||
- orange :: orange fruit | - orange :: orange fruit | |||
bank | bank | |||
Multiple definitions, loose: | Multiple definitions, loose: | |||
skipping to change at line 402 | skipping to change at line 402 | |||
foo | foo | |||
And nested without indentation: | And nested without indentation: | |||
foo | foo | |||
bar | bar | |||
Interpreted markdown in a table: | Interpreted markdown in a table: | |||
#+BEGIN_HTML | #+begin_html | |||
<table> | <table> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<tr> | <tr> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<td> | <td> | |||
#+END_HTML | #+end_html | |||
This is /emphasized/ | This is /emphasized/ | |||
#+BEGIN_HTML | #+begin_html | |||
</td> | </td> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<td> | <td> | |||
#+END_HTML | #+end_html | |||
And this is *strong* | And this is *strong* | |||
#+BEGIN_HTML | #+begin_html | |||
</td> | </td> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
</tr> | </tr> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
</table> | </table> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<script type="text/javascript">document.write('This *should not* be interprete d as markdown');</script> | <script type="text/javascript">document.write('This *should not* be interprete d as markdown');</script> | |||
#+END_HTML | #+end_html | |||
Here's a simple block: | Here's a simple block: | |||
foo | foo | |||
This should be a code block, though: | This should be a code block, though: | |||
#+BEGIN_EXAMPLE | #+begin_example | |||
<div> | <div> | |||
foo | foo | |||
</div> | </div> | |||
#+END_EXAMPLE | #+end_example | |||
As should this: | As should this: | |||
#+BEGIN_EXAMPLE | #+begin_example | |||
<div>foo</div> | <div>foo</div> | |||
#+END_EXAMPLE | #+end_example | |||
Now, nested: | Now, nested: | |||
foo | foo | |||
This should just be an HTML comment: | This should just be an HTML comment: | |||
#+BEGIN_HTML | #+begin_html | |||
<!-- Comment --> | <!-- Comment --> | |||
#+END_HTML | #+end_html | |||
Multiline: | Multiline: | |||
#+BEGIN_HTML | #+begin_html | |||
<!-- | <!-- | |||
Blah | Blah | |||
Blah | Blah | |||
--> | --> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<!-- | <!-- | |||
This is another comment. | This is another comment. | |||
--> | --> | |||
#+END_HTML | #+end_html | |||
Code block: | Code block: | |||
#+BEGIN_EXAMPLE | #+begin_example | |||
<!-- Comment --> | <!-- Comment --> | |||
#+END_EXAMPLE | #+end_example | |||
Just plain comment, with trailing spaces on the line: | Just plain comment, with trailing spaces on the line: | |||
#+BEGIN_HTML | #+begin_html | |||
<!-- foo --> | <!-- foo --> | |||
#+END_HTML | #+end_html | |||
Code: | Code: | |||
#+BEGIN_EXAMPLE | #+begin_example | |||
<hr /> | <hr /> | |||
#+END_EXAMPLE | #+end_example | |||
Hr's: | Hr's: | |||
#+BEGIN_HTML | #+begin_html | |||
<hr> | <hr> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<hr /> | <hr /> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<hr /> | <hr /> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<hr> | <hr> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<hr /> | <hr /> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<hr /> | <hr /> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<hr class="foo" id="bar" /> | <hr class="foo" id="bar" /> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<hr class="foo" id="bar" /> | <hr class="foo" id="bar" /> | |||
#+END_HTML | #+end_html | |||
#+BEGIN_HTML | #+begin_html | |||
<hr class="foo" id="bar"> | <hr class="foo" id="bar"> | |||
#+END_HTML | #+end_html | |||
-------------- | -------------- | |||
* Inline Markup | * Inline Markup | |||
:PROPERTIES: | :PROPERTIES: | |||
:CUSTOM_ID: inline-markup | :CUSTOM_ID: inline-markup | |||
:END: | :END: | |||
This is /emphasized/, and so /is this/. | This is /emphasized/, and so /is this/. | |||
This is *strong*, and so *is this*. | This is *strong*, and so *is this*. | |||
skipping to change at line 730 | skipping to change at line 730 | |||
[[/url/][b]] by itself should be a link. | [[/url/][b]] by itself should be a link. | |||
Indented [[/url][once]]. | Indented [[/url][once]]. | |||
Indented [[/url][twice]]. | Indented [[/url][twice]]. | |||
Indented [[/url][thrice]]. | Indented [[/url][thrice]]. | |||
This should [not][] be a link. | This should [not][] be a link. | |||
#+BEGIN_EXAMPLE | #+begin_example | |||
[not]: /url | [not]: /url | |||
#+END_EXAMPLE | #+end_example | |||
Foo [[/url/][bar]]. | Foo [[/url/][bar]]. | |||
Foo [[/url/][biz]]. | Foo [[/url/][biz]]. | |||
** With ampersands | ** With ampersands | |||
:PROPERTIES: | :PROPERTIES: | |||
:CUSTOM_ID: with-ampersands | :CUSTOM_ID: with-ampersands | |||
:END: | :END: | |||
Here's a [[http://example.com/?foo=1&bar=2][link with an ampersand in the | Here's a [[http://example.com/?foo=1&bar=2][link with an ampersand in the | |||
skipping to change at line 763 | skipping to change at line 763 | |||
:CUSTOM_ID: autolinks | :CUSTOM_ID: autolinks | |||
:END: | :END: | |||
With an ampersand: [[http://example.com/?foo=1&bar=2]] | With an ampersand: [[http://example.com/?foo=1&bar=2]] | |||
- In a list? | - In a list? | |||
- [[http://example.com/]] | - [[http://example.com/]] | |||
- It should. | - It should. | |||
An e-mail address: [[mailto:nobody@nowhere.net][nobody@nowhere.net]] | An e-mail address: [[mailto:nobody@nowhere.net][nobody@nowhere.net]] | |||
#+BEGIN_QUOTE | #+begin_quote | |||
Blockquoted: [[http://example.com/]] | Blockquoted: [[http://example.com/]] | |||
#+END_QUOTE | #+end_quote | |||
Auto-links should not occur here: =<http://example.com/>= | Auto-links should not occur here: =<http://example.com/>= | |||
#+BEGIN_EXAMPLE | #+begin_example | |||
or here: <http://example.com/> | or here: <http://example.com/> | |||
#+END_EXAMPLE | #+end_example | |||
-------------- | -------------- | |||
* Images | * Images | |||
:PROPERTIES: | :PROPERTIES: | |||
:CUSTOM_ID: images | :CUSTOM_ID: images | |||
:END: | :END: | |||
From "Voyage dans la Lune" by Georges Melies (1902): | From "Voyage dans la Lune" by Georges Melies (1902): | |||
#+CAPTION: lalune | #+caption: lalune | |||
[[file:lalune.jpg]] | [[file:lalune.jpg]] | |||
Here is a movie [[file:movie.jpg]] icon. | Here is a movie [[file:movie.jpg]] icon. | |||
-------------- | -------------- | |||
* Footnotes | * Footnotes | |||
:PROPERTIES: | :PROPERTIES: | |||
:CUSTOM_ID: footnotes | :CUSTOM_ID: footnotes | |||
:END: | :END: | |||
Here is a footnote reference,[fn:1] and another.[fn:2] This should /not/ be a | Here is a footnote reference,[fn:1] and another.[fn:2] This should /not/ be a | |||
footnote reference, because it contains a space.[^my note] Here is an inline | footnote reference, because it contains a space.[^my note] Here is an inline | |||
note.[fn:3] | note.[fn:3] | |||
#+BEGIN_QUOTE | #+begin_quote | |||
Notes can go in quotes.[fn:4] | Notes can go in quotes.[fn:4] | |||
#+END_QUOTE | #+end_quote | |||
1. And in list items.[fn:5] | 1. And in list items.[fn:5] | |||
This paragraph should not be part of the note, as it is not indented. | This paragraph should not be part of the note, as it is not indented. | |||
[fn:1] Here is the footnote. It can go anywhere after the footnote reference. | [fn:1] Here is the footnote. It can go anywhere after the footnote reference. | |||
It need not be placed at the end of the document. | It need not be placed at the end of the document. | |||
[fn:2] Here's the long note. This one contains multiple blocks. | [fn:2] Here's the long note. This one contains multiple blocks. | |||
Subsequent blocks are indented to show that they belong to the footnote | Subsequent blocks are indented to show that they belong to the footnote | |||
(as with list items). | (as with list items). | |||
#+BEGIN_EXAMPLE | #+begin_example | |||
{ <code> } | { <code> } | |||
#+END_EXAMPLE | #+end_example | |||
If you want, you can indent every line, but you can also be lazy and | If you want, you can indent every line, but you can also be lazy and | |||
just indent the first line of each block. | just indent the first line of each block. | |||
[fn:3] This is /easier/ to type. Inline notes may contain | [fn:3] This is /easier/ to type. Inline notes may contain | |||
[[http://google.com][links]] and =]= verbatim characters, as well as | [[http://google.com][links]] and =]= verbatim characters, as well as | |||
[bracketed text]. | [bracketed text]. | |||
[fn:4] In quote. | [fn:4] In quote. | |||
End of changes. 82 change blocks. | ||||
84 lines changed or deleted | 84 lines changed or added |