2010-12-03 17:26:22 +01:00
|
|
|
This is a set of tests for pandoc Textile Reader. Part of it comes
|
|
|
|
from John Gruber's markdown test suite.
|
2010-10-03 20:55:46 +02:00
|
|
|
|
|
|
|
-----
|
|
|
|
|
|
|
|
h1. Headers
|
|
|
|
|
|
|
|
h2. Level 2 with an "embeded link":http://www.example.com
|
|
|
|
|
|
|
|
h3. Level 3 with *emphasis*
|
|
|
|
|
|
|
|
h4. Level 4
|
|
|
|
|
|
|
|
h5. Level 5
|
|
|
|
|
|
|
|
h6. Level 6
|
|
|
|
|
|
|
|
|
|
|
|
h1. Paragraphs
|
|
|
|
|
|
|
|
Here's a regular paragraph.
|
|
|
|
|
2010-12-03 17:26:22 +01:00
|
|
|
Line breaks are preserved in textile, so you can not wrap your very
|
|
|
|
long paragraph with your favourite text editor and have it rendered
|
|
|
|
with no break.
|
|
|
|
|
2010-10-03 20:55:46 +02:00
|
|
|
|
|
|
|
Here's one with a bullet.
|
|
|
|
|
|
|
|
* criminey.
|
|
|
|
|
2010-12-03 17:26:22 +01:00
|
|
|
There should be a paragraph break between here
|
2010-10-03 20:55:46 +02:00
|
|
|
|
2010-12-03 17:26:22 +01:00
|
|
|
and here.
|
2010-10-03 20:55:46 +02:00
|
|
|
|
2011-01-23 17:59:35 +01:00
|
|
|
pandoc converts textile.
|
|
|
|
|
2010-10-03 20:55:46 +02:00
|
|
|
h1. Block Quotes
|
|
|
|
|
|
|
|
bq. This is a famous quote from somebody. He had a lot of things to
|
|
|
|
say, so the text is really really long and spans on multiple lines.
|
|
|
|
|
|
|
|
And a following paragraph.
|
|
|
|
|
|
|
|
h1. Code Blocks
|
|
|
|
|
|
|
|
Code:
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
---- (should be four hyphens)
|
|
|
|
|
|
|
|
sub status {
|
|
|
|
print "working";
|
|
|
|
}
|
|
|
|
|
|
|
|
this code block is indented by one tab
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
And:
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
this code block is indented by two tabs
|
|
|
|
|
|
|
|
These should not be escaped: \$ \\ \> \[ \{
|
|
|
|
</pre>
|
|
|
|
|
2011-01-23 09:05:35 +01:00
|
|
|
bc. Code block with .bc
|
|
|
|
continued
|
|
|
|
@</\
|
2010-10-03 20:55:46 +02:00
|
|
|
|
2011-01-23 09:25:05 +01:00
|
|
|
Inline code: @<tt>@, <tt>@</tt>.
|
|
|
|
|
2012-05-29 13:41:28 +02:00
|
|
|
h1. Notextile
|
|
|
|
|
|
|
|
A block of text can be protected with notextile :
|
|
|
|
|
|
|
|
<notextile>
|
|
|
|
No *bold* and
|
|
|
|
* no bullet
|
|
|
|
</notextile>
|
|
|
|
|
|
|
|
and inlines can be protected with ==double *equals (=)* markup==.
|
|
|
|
|
2010-10-03 20:55:46 +02:00
|
|
|
h1. Lists
|
|
|
|
|
|
|
|
h2. Unordered
|
|
|
|
|
|
|
|
Asterisks tight:
|
|
|
|
|
|
|
|
* asterisk 1
|
|
|
|
* asterisk 2
|
|
|
|
* asterisk 3
|
|
|
|
|
2012-10-13 19:44:38 +02:00
|
|
|
With line breaks:
|
|
|
|
|
|
|
|
* asterisk 1
|
|
|
|
newline
|
|
|
|
* asterisk 2
|
|
|
|
|
2010-10-03 20:55:46 +02:00
|
|
|
h2. Ordered
|
|
|
|
|
|
|
|
Tight:
|
|
|
|
|
|
|
|
# First
|
|
|
|
# Second
|
|
|
|
# Third
|
|
|
|
|
|
|
|
h2. Nested
|
|
|
|
|
|
|
|
* ui 1
|
|
|
|
** ui 1.1
|
|
|
|
### oi 1.1.1
|
|
|
|
### oi 1.1.2
|
|
|
|
** ui 1.2
|
|
|
|
* ui 2
|
|
|
|
## oi 2.1
|
|
|
|
*** ui 2.1.1
|
|
|
|
*** ui 2.1.2
|
|
|
|
|
2010-12-09 13:40:42 +01:00
|
|
|
h2. Definition List
|
|
|
|
|
|
|
|
- coffee := Hot and black
|
|
|
|
- tea := Also hot, but a little less black
|
|
|
|
- milk :=
|
|
|
|
Nourishing beverage for baby cows.
|
|
|
|
|
|
|
|
Cold drink that goes great with cookies.=:
|
|
|
|
- beer := fresh and bitter
|
|
|
|
|
2010-10-03 20:55:46 +02:00
|
|
|
|
|
|
|
h1. Inline Markup
|
|
|
|
|
|
|
|
This is _emphasized_, and so __is this__.
|
|
|
|
This is *strong*, and so **is this**.
|
2012-04-24 15:56:59 +02:00
|
|
|
Hyphenated-words-are-ok, as well as strange_underscore_notation.
|
2010-10-03 20:55:46 +02:00
|
|
|
A "*strong link*":http://www.foobar.com.
|
|
|
|
|
|
|
|
_*This is strong and em.*_
|
|
|
|
So is *_this_* word and __**that one**__.
|
|
|
|
-This is strikeout and *strong*-
|
|
|
|
|
2012-04-24 15:56:59 +02:00
|
|
|
Superscripts: a[^bc^]d a^*hello*^ a[^hello there^].
|
|
|
|
Subscripts: ~here~ H[~2~]O, H[~23~]O, H[~many of them~]O.
|
2010-10-03 20:55:46 +02:00
|
|
|
|
2010-12-03 17:26:22 +01:00
|
|
|
Dashes : How cool -- automatic dashes.
|
|
|
|
|
|
|
|
Elipses : He thought and thought ... and then thought some more.
|
|
|
|
|
|
|
|
Quotes and apostrophes : "I'd like to thank you" for example.
|
|
|
|
|
2010-10-03 20:55:46 +02:00
|
|
|
|
|
|
|
h1. Links
|
|
|
|
|
|
|
|
h2. Explicit
|
|
|
|
|
|
|
|
Just a "url":http://www.url.com
|
|
|
|
|
|
|
|
"Email link":mailto:nobody@nowhere.net
|
|
|
|
|
2012-11-07 01:05:17 +01:00
|
|
|
Automatic linking to "$":http://www.example.com.
|
2010-10-03 20:55:46 +02:00
|
|
|
|
2011-06-14 18:11:16 +02:00
|
|
|
"Example":http://www.example.com/: Example of a link followed by a colon.
|
|
|
|
|
2012-07-13 23:01:56 +02:00
|
|
|
A link["with brackets":http://www.example.com]and no spaces.
|
|
|
|
|
2010-10-03 20:55:46 +02:00
|
|
|
h1. Tables
|
|
|
|
|
|
|
|
Textile allows tables with and without headers :
|
|
|
|
|
|
|
|
h2. Without headers
|
|
|
|
|
|
|
|
| name | age | sex |
|
|
|
|
| joan | 24 | f |
|
|
|
|
| archie | 29 | m |
|
|
|
|
| bella | 45 | f |
|
|
|
|
|
2010-10-04 20:34:57 +02:00
|
|
|
and some text following ...
|
2010-10-03 20:55:46 +02:00
|
|
|
|
|
|
|
h2. With headers
|
|
|
|
|
|
|
|
|_. name |_. age |_. sex |
|
|
|
|
| joan | 24 | f |
|
|
|
|
| archie | 29 | m |
|
|
|
|
| bella | 45 | f |
|
|
|
|
|
|
|
|
|
2010-10-04 20:34:57 +02:00
|
|
|
|
2010-10-03 20:55:46 +02:00
|
|
|
h1. Images
|
|
|
|
|
|
|
|
Textile inline image syntax, like
|
|
|
|
here !this_is_an_image.png(this is the alt text)!
|
|
|
|
and here !this_is_an_image.png!.
|
2010-11-07 19:58:45 +01:00
|
|
|
|
|
|
|
h1. Attributes
|
|
|
|
|
|
|
|
h2{color:red}. HTML and CSS attributes are ignored
|
|
|
|
|
2010-12-03 17:26:22 +01:00
|
|
|
as well as *(foo)inline attributes* of %{color:red} all kind%
|
2010-11-07 19:58:45 +01:00
|
|
|
|
|
|
|
p{color:green}. and paragraph attributes, and table attributes.
|
|
|
|
|
|
|
|
table{foo:bar}.
|
|
|
|
| name | age | sex |
|
|
|
|
| joan | 24 | f |
|
2010-11-23 12:09:04 +01:00
|
|
|
|
|
|
|
h1. Raw HTML
|
|
|
|
|
|
|
|
However, <strong> raw HTML inlines </strong> are accepted, as well as :
|
|
|
|
|
|
|
|
<div class="foobar">
|
|
|
|
any *Raw HTML Block* with bold
|
|
|
|
</div>
|
|
|
|
|
|
|
|
Html blocks can be <div>inlined</div> as well.
|
|
|
|
|
|
|
|
* this <div> won't produce raw html blocks </div>
|
|
|
|
* but this <strong> will produce inline html </strong>
|
|
|
|
|
|
|
|
Can you prove that 2 < 3 ?
|
2010-12-08 03:28:36 +01:00
|
|
|
|
2012-04-17 13:14:05 +02:00
|
|
|
h1. Raw LaTeX
|
|
|
|
|
|
|
|
This Textile reader also accepts raw LaTeX for blocks :
|
|
|
|
|
|
|
|
\begin{itemize}
|
|
|
|
\item one
|
|
|
|
\item two
|
|
|
|
\end{itemize}
|
|
|
|
|
|
|
|
and for \emph{inlines}.
|
|
|
|
|
2010-12-08 03:28:36 +01:00
|
|
|
h1. Acronyms and marks
|
|
|
|
|
|
|
|
PBS(Public Broadcasting System)
|
|
|
|
|
|
|
|
Hi(tm)
|
|
|
|
|
|
|
|
Hi (TM)
|
|
|
|
|
|
|
|
(r) Hi(r)
|
|
|
|
|
|
|
|
Hi(c)2008 (C) 2008
|
2010-12-08 09:44:46 +01:00
|
|
|
|
|
|
|
h1. Footnotes
|
|
|
|
|
2012-08-26 07:11:31 +02:00
|
|
|
A note.[1] Another note[2].
|
2010-12-08 09:44:46 +01:00
|
|
|
|
|
|
|
fn1. The note
|
|
|
|
is here!
|
2012-08-26 07:11:31 +02:00
|
|
|
|
|
|
|
fn2. Other note.
|
2012-10-05 19:23:15 +02:00
|
|
|
|
|
|
|
h1. Comment blocks
|
|
|
|
|
|
|
|
###. my comment
|
|
|
|
is here.
|
|
|
|
|
|
|
|
not a comment.
|