aboutsummaryrefslogtreecommitdiff
path: root/tests/textile-reader.textile
blob: 7384abb64a86d4dc2d437280de26852ff1b8a063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
This is a set of tests for pandoc. Most of them are adapted from John
Gruber's markdown test suite.

-----

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.

Line break are not paragraph break in textile, so you can wrap your
very long paragraph with your favourite text editor, it will be
rendered as a single one.

Here's one with a bullet.

* criminey.

There should be a hard line break  

here.

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>


h1. Lists

h2. Unordered

Asterisks tight:

* asterisk 1
* asterisk 2
* asterisk 3

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


h1. Inline Markup

This is _emphasized_, and so __is this__.

This is *strong*, and so **is this**.

A "*strong link*":http://www.foobar.com.

_*This is strong and em.*_

So is *_this_* word and __**that one**__.

-This is strikeout and *strong*-

Superscripts:  a^bc^d a^*hello*^ a^hello there^.

Subscripts: H~2~O, H~23~O, H~many of them~O.


h1. Links

h2. Explicit

Just a "url":http://www.url.com

"Email link":mailto:nobody@nowhere.net

Automatic linking to http://www.example.com and foobar@example.com.

h1. Tables

Textile allows tables with and without headers :

h2. Without headers

| name   | age | sex |
| joan   | 24  | f   |
| archie | 29  | m   |
| bella  | 45  | f   |

and some text following ...

h2. With headers

|_. name |_. age |_. sex |
| joan   | 24    | f     |
| archie | 29    | m     |
| bella  | 45    | f     |



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!.

h1. Attributes

h2{color:red}. HTML and CSS attributes are ignored

as well as *(foo)inline attributes*

p{color:green}. and paragraph attributes, and table attributes.

table{foo:bar}.
| name   | age | sex |
| joan   | 24  | f   |

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 ?