RedCloth 4.2.4-java
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of RedCloth might be problematic. Click here for more details.
- data/.gemtest +0 -0
- data/.gitignore +26 -0
- data/.rspec +1 -0
- data/CHANGELOG +235 -0
- data/COPYING +18 -0
- data/Gemfile +7 -0
- data/README +198 -0
- data/Rakefile +16 -0
- data/bin/redcloth +28 -0
- data/doc/textile_reference.html +631 -0
- data/lib/case_sensitive_require/RedCloth.rb +6 -0
- data/lib/redcloth.rb +44 -0
- data/lib/redcloth/erb_extension.rb +27 -0
- data/lib/redcloth/formatters/base.rb +63 -0
- data/lib/redcloth/formatters/html.rb +345 -0
- data/lib/redcloth/formatters/latex.rb +322 -0
- data/lib/redcloth/formatters/latex_entities.yml +2414 -0
- data/lib/redcloth/textile_doc.rb +103 -0
- data/lib/redcloth/version.rb +34 -0
- data/lib/tasks/pureruby.rake +17 -0
- data/redcloth.gemspec +47 -0
- data/spec/benchmark_spec.rb +15 -0
- data/spec/custom_tags_spec.rb +50 -0
- data/spec/erb_spec.rb +10 -0
- data/spec/extension_spec.rb +26 -0
- data/spec/fixtures/basic.yml +1028 -0
- data/spec/fixtures/code.yml +257 -0
- data/spec/fixtures/definitions.yml +82 -0
- data/spec/fixtures/extra_whitespace.yml +64 -0
- data/spec/fixtures/filter_html.yml +177 -0
- data/spec/fixtures/filter_pba.yml +20 -0
- data/spec/fixtures/html.yml +348 -0
- data/spec/fixtures/images.yml +279 -0
- data/spec/fixtures/instiki.yml +38 -0
- data/spec/fixtures/links.yml +291 -0
- data/spec/fixtures/lists.yml +462 -0
- data/spec/fixtures/poignant.yml +89 -0
- data/spec/fixtures/sanitize_html.yml +42 -0
- data/spec/fixtures/table.yml +434 -0
- data/spec/fixtures/textism.yml +509 -0
- data/spec/fixtures/threshold.yml +762 -0
- data/spec/formatters/class_filtered_html_spec.rb +7 -0
- data/spec/formatters/filtered_html_spec.rb +7 -0
- data/spec/formatters/html_no_breaks_spec.rb +9 -0
- data/spec/formatters/html_spec.rb +13 -0
- data/spec/formatters/id_filtered_html_spec.rb +7 -0
- data/spec/formatters/latex_spec.rb +13 -0
- data/spec/formatters/lite_mode_html_spec.rb +7 -0
- data/spec/formatters/no_span_caps_html_spec.rb +7 -0
- data/spec/formatters/sanitized_html_spec.rb +7 -0
- data/spec/formatters/style_filtered_html_spec.rb +7 -0
- data/spec/parser_spec.rb +102 -0
- data/spec/spec_helper.rb +36 -0
- data/tasks/compile.rake +47 -0
- data/tasks/gems.rake +37 -0
- data/tasks/ragel_extension_task.rb +127 -0
- data/tasks/release.rake +15 -0
- data/tasks/rspec.rake +13 -0
- data/tasks/rvm.rake +78 -0
- data/test/ragel_profiler.rb +73 -0
- data/test/validate_fixtures.rb +74 -0
- metadata +166 -0
@@ -0,0 +1,89 @@
|
|
1
|
+
--- # Tests from the (Poignant Guide)
|
2
|
+
in: >
|
3
|
+
h3. False
|
4
|
+
|
5
|
+
|
6
|
+
!<i/blix-neg.gif(Shape of a cat.)!
|
7
|
+
|
8
|
+
|
9
|
+
_The cat Trady Blix. Frozen in emptiness. Immaculate whiskers rigid. Placid
|
10
|
+
eyes of lake. Tail of warm icicle. Sponsored by a Very Powerful Pause Button._
|
11
|
+
|
12
|
+
|
13
|
+
The darkness surrounding Blix can be called *negative space*. Hang on to that phrase.
|
14
|
+
Let it suggest that the emptiness has a negative connotation. In a similar way,
|
15
|
+
@nil@ has a slightly sour note that it whistles.
|
16
|
+
|
17
|
+
|
18
|
+
Generally speaking, everything in Ruby has a positive charge to it. This spark
|
19
|
+
flows through strings, numbers, regexps, all of it. Only two keywords wear a
|
20
|
+
shady cloak: @nil@ and @false@ draggin us down.
|
21
|
+
|
22
|
+
|
23
|
+
You can test that charge with an @if@ keyword. It looks very much like the
|
24
|
+
@do@ blocks we saw in the last chapter, in that both end with an @end@.
|
25
|
+
|
26
|
+
|
27
|
+
<pre>
|
28
|
+
if plastic_cup
|
29
|
+
print "Plastic cup is on the up 'n' up!"
|
30
|
+
end
|
31
|
+
</pre>
|
32
|
+
|
33
|
+
|
34
|
+
If @plastic_cup@ contains either @nil@ or @false@, you won't see anything print
|
35
|
+
to the screen. They're not on the @if@ guest list. So @if@ isn't going to run
|
36
|
+
any of the code it's protecting.
|
37
|
+
|
38
|
+
|
39
|
+
But @nil@ and @false@ need not walk away in shame. They may be of questionable
|
40
|
+
character, but @unless@ runs a smaller establishment that caters to the bedraggled.
|
41
|
+
The @unless@ keyword has a policy of only allowing those with a negative charge in.
|
42
|
+
Who are: @nil@ and @false@.
|
43
|
+
|
44
|
+
|
45
|
+
<pre>
|
46
|
+
unless plastic_cup
|
47
|
+
print "Plastic cup is on the down low."
|
48
|
+
end
|
49
|
+
</pre>
|
50
|
+
|
51
|
+
|
52
|
+
You can also use @if@ and @unless@ at the end of a single line of code, if that's
|
53
|
+
all that is being protected.
|
54
|
+
|
55
|
+
|
56
|
+
<pre>
|
57
|
+
print "Yeah, plastic cup is up again!" if plastic_cup
|
58
|
+
print "Hardly. It's down." unless plastic_cup
|
59
|
+
</pre>
|
60
|
+
|
61
|
+
|
62
|
+
Now that you've met @false@, I'm sure you can see what's on next.
|
63
|
+
|
64
|
+
html: |-
|
65
|
+
<h3>False</h3>
|
66
|
+
<p style="float:left;"><img src="i/blix-neg.gif" title="Shape of a cat." alt="Shape of a cat." /></p>
|
67
|
+
<p><em>The cat Trady Blix. Frozen in emptiness. Immaculate whiskers rigid. Placid eyes of lake. Tail of warm icicle. Sponsored by a Very Powerful Pause Button.</em></p>
|
68
|
+
<p>The darkness surrounding Blix can be called <strong>negative space</strong>. Hang on to that phrase. Let it suggest that the emptiness has a negative connotation. In a similar way, <code>nil</code> has a slightly sour note that it whistles.</p>
|
69
|
+
<p>Generally speaking, everything in Ruby has a positive charge to it. This spark flows through strings, numbers, regexps, all of it. Only two keywords wear a shady cloak: <code>nil</code> and <code>false</code> draggin us down.</p>
|
70
|
+
<p>You can test that charge with an <code>if</code> keyword. It looks very much like the <code>do</code> blocks we saw in the last chapter, in that both end with an <code>end</code>.</p>
|
71
|
+
<pre>
|
72
|
+
if plastic_cup
|
73
|
+
print "Plastic cup is on the up 'n' up!"
|
74
|
+
end
|
75
|
+
</pre>
|
76
|
+
<p>If <code>plastic_cup</code> contains either <code>nil</code> or <code>false</code>, you won’t see anything print to the screen. They’re not on the <code>if</code> guest list. So <code>if</code> isn’t going to run any of the code it’s protecting.</p>
|
77
|
+
<p>But <code>nil</code> and <code>false</code> need not walk away in shame. They may be of questionable character, but <code>unless</code> runs a smaller establishment that caters to the bedraggled. The <code>unless</code> keyword has a policy of only allowing those with a negative charge in. Who are: <code>nil</code> and <code>false</code>.</p>
|
78
|
+
<pre>
|
79
|
+
unless plastic_cup
|
80
|
+
print "Plastic cup is on the down low."
|
81
|
+
end
|
82
|
+
</pre>
|
83
|
+
<p>You can also use <code>if</code> and <code>unless</code> at the end of a single line of code, if that’s all that is being protected.</p>
|
84
|
+
<pre>
|
85
|
+
print "Yeah, plastic cup is up again!" if plastic_cup
|
86
|
+
print "Hardly. It's down." unless plastic_cup
|
87
|
+
</pre>
|
88
|
+
<p>Now that you’ve met <code>false</code>, I’m sure you can see what’s on next.</p>
|
89
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
in: Just a little harmless xss <script src=http://ha.ckers.org/xss.js>stuff</script>.
|
3
|
+
sanitized_html: <p>Just a little harmless xss stuff.</p>
|
4
|
+
---
|
5
|
+
in: Here's a bad image <img src="JaVaScRiPt:alert('XSS');" />
|
6
|
+
sanitized_html: <p>Here’s a bad image <img /></p>
|
7
|
+
---
|
8
|
+
in: Just some random > and < characters, but also a <br/> tag.
|
9
|
+
sanitized_html: <p>Just some random > and < characters, but also a <br/> tag.</p>
|
10
|
+
---
|
11
|
+
name: processes text beginning with space
|
12
|
+
in: ' This began with a space and ends with some XSS: <script type="text/javascript">alert("Hai. I`m in ya PC. Makin ya XSS viruzz! KThxBye");</script>'
|
13
|
+
sanitized_html: 'This began with a space and ends with some <span class="caps">XSS</span>: alert(“Hai. I`m in ya PC. Makin ya <span class="caps">XSS</span> viruzz! KThxBye”);'
|
14
|
+
---
|
15
|
+
name: processes text in notextile tags
|
16
|
+
in: |-
|
17
|
+
<notextile>
|
18
|
+
The bad tags should be <b>missing</b>: <script type="text/javascript">alert("Hai. I`m in ya PC. Makin ya XSS viruzz! KThxBye");</script>
|
19
|
+
</notextile>
|
20
|
+
sanitized_html: |-
|
21
|
+
The bad tags should be <b>missing</b>: alert("Hai. I`m in ya PC. Makin ya XSS viruzz! KThxBye");
|
22
|
+
---
|
23
|
+
name: processes text in inline notextile tags
|
24
|
+
in: |-
|
25
|
+
The bad tags should be <b>missing</b>: <notextile><script type="text/javascript">alert("Hai. I`m in ya PC. Makin ya XSS viruzz! KThxBye");</script></notextile>
|
26
|
+
sanitized_html: |-
|
27
|
+
<p>The bad tags should be <b>missing</b>: alert("Hai. I`m in ya PC. Makin ya XSS viruzz! KThxBye");</p>
|
28
|
+
---
|
29
|
+
name: removes script tags
|
30
|
+
in: |-
|
31
|
+
<script type="text/javascript">
|
32
|
+
alert("Hai. I`m in ya PC. Makin ya XSS viruzz! KThxBye");
|
33
|
+
</script>
|
34
|
+
sanitized_html: "alert(“Hai. I`m in ya PC. Makin ya <span class=\"caps\">XSS</span> viruzz! KThxBye”);"
|
35
|
+
---
|
36
|
+
name: removes nested script tags
|
37
|
+
in: |-
|
38
|
+
<script type="text/javascript"><script>
|
39
|
+
alert("Hai. I`m in ya PC. Makin ya XSS viruzz! KThxBye");
|
40
|
+
</script></script>
|
41
|
+
sanitized_html: |-
|
42
|
+
alert(“Hai. I`m in ya PC. Makin ya <span class="caps">XSS</span> viruzz! KThxBye”);
|
@@ -0,0 +1,434 @@
|
|
1
|
+
---
|
2
|
+
in: |
|
3
|
+
|a|b|c|
|
4
|
+
|1|2|3|
|
5
|
+
|
6
|
+
h3. A header after the table
|
7
|
+
html: |-
|
8
|
+
<table>
|
9
|
+
<tr>
|
10
|
+
<td>a</td>
|
11
|
+
<td>b</td>
|
12
|
+
<td>c</td>
|
13
|
+
</tr>
|
14
|
+
<tr>
|
15
|
+
<td>1</td>
|
16
|
+
<td>2</td>
|
17
|
+
<td>3</td>
|
18
|
+
</tr>
|
19
|
+
</table>
|
20
|
+
<h3>A header after the table</h3>
|
21
|
+
latex: |+
|
22
|
+
\begin{table}
|
23
|
+
\centering
|
24
|
+
\begin{tabular}{ l l l }
|
25
|
+
a & b & c \\
|
26
|
+
1 & 2 & 3 \\
|
27
|
+
\end{tabular}
|
28
|
+
\end{table}
|
29
|
+
\subsubsection{A header after the table}
|
30
|
+
|
31
|
+
---
|
32
|
+
in: |
|
33
|
+
|_. a|_. b|_. c|
|
34
|
+
|1|2|3|
|
35
|
+
html: |-
|
36
|
+
<table>
|
37
|
+
<tr>
|
38
|
+
<th>a</th>
|
39
|
+
<th>b</th>
|
40
|
+
<th>c</th>
|
41
|
+
</tr>
|
42
|
+
<tr>
|
43
|
+
<td>1</td>
|
44
|
+
<td>2</td>
|
45
|
+
<td>3</td>
|
46
|
+
</tr>
|
47
|
+
</table>
|
48
|
+
---
|
49
|
+
in: |-
|
50
|
+
|This|is|a|simple|table|
|
51
|
+
|This|is|a|simple|row|
|
52
|
+
html: |-
|
53
|
+
<table>
|
54
|
+
<tr>
|
55
|
+
<td>This</td>
|
56
|
+
<td>is</td>
|
57
|
+
<td>a</td>
|
58
|
+
<td>simple</td>
|
59
|
+
<td>table</td>
|
60
|
+
</tr>
|
61
|
+
<tr>
|
62
|
+
<td>This</td>
|
63
|
+
<td>is</td>
|
64
|
+
<td>a</td>
|
65
|
+
<td>simple</td>
|
66
|
+
<td>row</td>
|
67
|
+
</tr>
|
68
|
+
</table>
|
69
|
+
latex: |+
|
70
|
+
\begin{table}
|
71
|
+
\centering
|
72
|
+
\begin{tabular}{ l l l l l }
|
73
|
+
This & is & a & simple & table \\
|
74
|
+
This & is & a & simple & row \\
|
75
|
+
\end{tabular}
|
76
|
+
\end{table}
|
77
|
+
---
|
78
|
+
in: |-
|
79
|
+
table{border:1px solid black}.
|
80
|
+
|This|is|a|row|
|
81
|
+
|This|is|a|row|
|
82
|
+
html: |-
|
83
|
+
<table style="border:1px solid black;">
|
84
|
+
<tr>
|
85
|
+
<td>This</td>
|
86
|
+
<td>is</td>
|
87
|
+
<td>a</td>
|
88
|
+
<td>row</td>
|
89
|
+
</tr>
|
90
|
+
<tr>
|
91
|
+
<td>This</td>
|
92
|
+
<td>is</td>
|
93
|
+
<td>a</td>
|
94
|
+
<td>row</td>
|
95
|
+
</tr>
|
96
|
+
</table>
|
97
|
+
---
|
98
|
+
in: '{background:#ddd}. |This|is|a|row|'
|
99
|
+
html: |-
|
100
|
+
<table>
|
101
|
+
<tr style="background:#ddd;">
|
102
|
+
<td>This</td>
|
103
|
+
<td>is</td>
|
104
|
+
<td>a</td>
|
105
|
+
<td>row</td>
|
106
|
+
</tr>
|
107
|
+
</table>
|
108
|
+
---
|
109
|
+
in: |-
|
110
|
+
|a|b|c|
|
111
|
+
| |2|3|
|
112
|
+
html: |-
|
113
|
+
<table>
|
114
|
+
<tr>
|
115
|
+
<td>a</td>
|
116
|
+
<td>b</td>
|
117
|
+
<td>c</td>
|
118
|
+
</tr>
|
119
|
+
<tr>
|
120
|
+
<td> </td>
|
121
|
+
<td>2</td>
|
122
|
+
<td>3</td>
|
123
|
+
</tr>
|
124
|
+
</table>
|
125
|
+
---
|
126
|
+
in: |-
|
127
|
+
table{width: 200px; border:2px solid gray;}.
|
128
|
+
|_=. Alignment|
|
129
|
+
|=. centered|
|
130
|
+
|=(. a bit right|
|
131
|
+
|=). a bit left|
|
132
|
+
|>). almost right|
|
133
|
+
|<(. almost left|
|
134
|
+
|>. right|
|
135
|
+
|<. left|
|
136
|
+
html: |-
|
137
|
+
<table style="width: 200px; border:2px solid gray;">
|
138
|
+
<tr>
|
139
|
+
<th style="text-align:center;">Alignment</th>
|
140
|
+
</tr>
|
141
|
+
<tr>
|
142
|
+
<td style="text-align:center;">centered</td>
|
143
|
+
</tr>
|
144
|
+
<tr>
|
145
|
+
<td style="padding-left:1em;text-align:center;">a bit right</td>
|
146
|
+
</tr>
|
147
|
+
<tr>
|
148
|
+
<td style="padding-right:1em;text-align:center;">a bit left</td>
|
149
|
+
</tr>
|
150
|
+
<tr>
|
151
|
+
<td style="padding-right:1em;text-align:right;">almost right</td>
|
152
|
+
</tr>
|
153
|
+
<tr>
|
154
|
+
<td style="padding-left:1em;text-align:left;">almost left</td>
|
155
|
+
</tr>
|
156
|
+
<tr>
|
157
|
+
<td style="text-align:right;">right</td>
|
158
|
+
</tr>
|
159
|
+
<tr>
|
160
|
+
<td style="text-align:left;">left</td>
|
161
|
+
</tr>
|
162
|
+
</table>
|
163
|
+
---
|
164
|
+
in: |-
|
165
|
+
|{background:#ddd}. Cell with gray background|Normal cell|
|
166
|
+
|\2. Cell spanning 2 columns|
|
167
|
+
|/2. Cell spanning 2 rows|one|
|
168
|
+
|two|
|
169
|
+
|>. Right-aligned cell|<. Left-aligned cell|
|
170
|
+
html: |-
|
171
|
+
<table>
|
172
|
+
<tr>
|
173
|
+
<td style="background:#ddd;">Cell with gray background</td>
|
174
|
+
<td>Normal cell</td>
|
175
|
+
</tr>
|
176
|
+
<tr>
|
177
|
+
<td colspan="2">Cell spanning 2 columns</td>
|
178
|
+
</tr>
|
179
|
+
<tr>
|
180
|
+
<td rowspan="2">Cell spanning 2 rows</td>
|
181
|
+
<td>one</td>
|
182
|
+
</tr>
|
183
|
+
<tr>
|
184
|
+
<td>two</td>
|
185
|
+
</tr>
|
186
|
+
<tr>
|
187
|
+
<td style="text-align:right;">Right-aligned cell</td>
|
188
|
+
<td style="text-align:left;">Left-aligned cell</td>
|
189
|
+
</tr>
|
190
|
+
</table>
|
191
|
+
latex: |+
|
192
|
+
\begin{table}
|
193
|
+
\centering
|
194
|
+
\begin{tabular}{ l l }
|
195
|
+
Cell with gray background & Normal cell \\
|
196
|
+
\multicolumn{2}{ l l }{Cell spanning 2 columns} \\
|
197
|
+
\multirow{2}{*}{Cell spanning 2 rows} & one \\
|
198
|
+
& two \\
|
199
|
+
Right-aligned cell & Left-aligned cell \\
|
200
|
+
\end{tabular}
|
201
|
+
\end{table}
|
202
|
+
---
|
203
|
+
name: row spanning mid-row
|
204
|
+
in: |-
|
205
|
+
|1|2|3|
|
206
|
+
|1|/3. 2|3|
|
207
|
+
|1|3|
|
208
|
+
|1|3|
|
209
|
+
|1|2|3|
|
210
|
+
html: |-
|
211
|
+
<table>
|
212
|
+
<tr>
|
213
|
+
<td>1</td>
|
214
|
+
<td>2</td>
|
215
|
+
<td>3</td>
|
216
|
+
</tr>
|
217
|
+
<tr>
|
218
|
+
<td>1</td>
|
219
|
+
<td rowspan="3">2</td>
|
220
|
+
<td>3</td>
|
221
|
+
</tr>
|
222
|
+
<tr>
|
223
|
+
<td>1</td>
|
224
|
+
<td>3</td>
|
225
|
+
</tr>
|
226
|
+
<tr>
|
227
|
+
<td>1</td>
|
228
|
+
<td>3</td>
|
229
|
+
</tr>
|
230
|
+
<tr>
|
231
|
+
<td>1</td>
|
232
|
+
<td>2</td>
|
233
|
+
<td>3</td>
|
234
|
+
</tr>
|
235
|
+
</table>
|
236
|
+
latex: |+
|
237
|
+
\begin{table}
|
238
|
+
\centering
|
239
|
+
\begin{tabular}{ l l l }
|
240
|
+
1 & 2 & 3 \\
|
241
|
+
1 & \multirow{3}{*}{2} & 3 \\
|
242
|
+
1 & & 3 \\
|
243
|
+
1 & & 3 \\
|
244
|
+
1 & 2 & 3 \\
|
245
|
+
\end{tabular}
|
246
|
+
\end{table}
|
247
|
+
---
|
248
|
+
in: |
|
249
|
+
{background:#ddd}. |S|Target|Complete|App|Milestone|
|
250
|
+
|!/i/g.gif!|11/29/04|11/29/04|011|XML spec complete (KH is on schedule)|
|
251
|
+
|!/i/g.gif!|11/22/04|11/22/04|070|Dialog pass 1 builds an index file|
|
252
|
+
|!/i/g.gif!|11/24/04|11/24/04|070|Dialog pass 2 98% complete|
|
253
|
+
|!/i/g.gif!|11/30/04|11/30/04|070|Feature complete. Passes end-to-end smoke test.|
|
254
|
+
|!/i/w.gif!|12/02/04| |011|Dialog pass 1 and 2 complete (98+%)|
|
255
|
+
|!/i/w.gif!|12/03/04| |081|Feature complete|
|
256
|
+
html: |-
|
257
|
+
<table>
|
258
|
+
<tr style="background:#ddd;">
|
259
|
+
<td>S</td>
|
260
|
+
<td>Target</td>
|
261
|
+
<td>Complete</td>
|
262
|
+
<td>App</td>
|
263
|
+
<td>Milestone</td>
|
264
|
+
</tr>
|
265
|
+
<tr>
|
266
|
+
<td><img src="/i/g.gif" alt="" /></td>
|
267
|
+
<td>11/29/04</td>
|
268
|
+
<td>11/29/04</td>
|
269
|
+
<td>011</td>
|
270
|
+
<td><span class="caps">XML</span> spec complete (KH is on schedule)</td>
|
271
|
+
</tr>
|
272
|
+
<tr>
|
273
|
+
<td><img src="/i/g.gif" alt="" /></td>
|
274
|
+
<td>11/22/04</td>
|
275
|
+
<td>11/22/04</td>
|
276
|
+
<td>070</td>
|
277
|
+
<td>Dialog pass 1 builds an index file</td>
|
278
|
+
</tr>
|
279
|
+
<tr>
|
280
|
+
<td><img src="/i/g.gif" alt="" /></td>
|
281
|
+
<td>11/24/04</td>
|
282
|
+
<td>11/24/04</td>
|
283
|
+
<td>070</td>
|
284
|
+
<td>Dialog pass 2 98% complete</td>
|
285
|
+
</tr>
|
286
|
+
<tr>
|
287
|
+
<td><img src="/i/g.gif" alt="" /></td>
|
288
|
+
<td>11/30/04</td>
|
289
|
+
<td>11/30/04</td>
|
290
|
+
<td>070</td>
|
291
|
+
<td>Feature complete. Passes end-to-end smoke test.</td>
|
292
|
+
</tr>
|
293
|
+
<tr>
|
294
|
+
<td><img src="/i/w.gif" alt="" /></td>
|
295
|
+
<td>12/02/04</td>
|
296
|
+
<td> </td>
|
297
|
+
<td>011</td>
|
298
|
+
<td>Dialog pass 1 and 2 complete (98+%)</td>
|
299
|
+
</tr>
|
300
|
+
<tr>
|
301
|
+
<td><img src="/i/w.gif" alt="" /></td>
|
302
|
+
<td>12/03/04</td>
|
303
|
+
<td> </td>
|
304
|
+
<td>081</td>
|
305
|
+
<td>Feature complete</td>
|
306
|
+
</tr>
|
307
|
+
</table>
|
308
|
+
---
|
309
|
+
name: combined table header and colspan
|
310
|
+
in: |-
|
311
|
+
table(my_class).
|
312
|
+
|_\2. a |_. b |_. c |
|
313
|
+
| 1 | 2 | 3 | 4 |
|
314
|
+
html: |-
|
315
|
+
<table class="my_class">
|
316
|
+
<tr>
|
317
|
+
<th colspan="2">a </th>
|
318
|
+
<th>b </th>
|
319
|
+
<th>c </th>
|
320
|
+
</tr>
|
321
|
+
<tr>
|
322
|
+
<td> 1 </td>
|
323
|
+
<td> 2 </td>
|
324
|
+
<td> 3 </td>
|
325
|
+
<td> 4 </td>
|
326
|
+
</tr>
|
327
|
+
</table>
|
328
|
+
---
|
329
|
+
name: two adjacent tables
|
330
|
+
in: |-
|
331
|
+
|a|b|c|
|
332
|
+
|
333
|
+
|1|2|3|
|
334
|
+
html: |-
|
335
|
+
<table>
|
336
|
+
<tr>
|
337
|
+
<td>a</td>
|
338
|
+
<td>b</td>
|
339
|
+
<td>c</td>
|
340
|
+
</tr>
|
341
|
+
</table>
|
342
|
+
<table>
|
343
|
+
<tr>
|
344
|
+
<td>1</td>
|
345
|
+
<td>2</td>
|
346
|
+
<td>3</td>
|
347
|
+
</tr>
|
348
|
+
</table>
|
349
|
+
---
|
350
|
+
name: with cell attributes
|
351
|
+
in: "|[en]. lang-ok|{color:red;}. style-ok|(myclass). class-ok|"
|
352
|
+
html: |-
|
353
|
+
<table>
|
354
|
+
<tr>
|
355
|
+
<td lang="en">lang-ok</td>
|
356
|
+
<td style="color:red;">style-ok</td>
|
357
|
+
<td class="myclass">class-ok</td>
|
358
|
+
</tr>
|
359
|
+
</table>
|
360
|
+
---
|
361
|
+
name: with improper cell attributes
|
362
|
+
in: "|[en]lang-bad|{color:red;}style-bad|(myclass)class-bad|"
|
363
|
+
html: |-
|
364
|
+
<table>
|
365
|
+
<tr>
|
366
|
+
<td>[en]lang-bad</td>
|
367
|
+
<td>{color:red;}style-bad</td>
|
368
|
+
<td>(myclass)class-bad</td>
|
369
|
+
</tr>
|
370
|
+
</table>
|
371
|
+
---
|
372
|
+
name: with line breaks in the cell
|
373
|
+
in: |-
|
374
|
+
|a|b
|
375
|
+
b|
|
376
|
+
|c
|
377
|
+
c|d|
|
378
|
+
html: |-
|
379
|
+
<table>
|
380
|
+
<tr>
|
381
|
+
<td>a</td>
|
382
|
+
<td>b<br />
|
383
|
+
b</td>
|
384
|
+
</tr>
|
385
|
+
<tr>
|
386
|
+
<td>c<br />
|
387
|
+
c</td>
|
388
|
+
<td>d</td>
|
389
|
+
</tr>
|
390
|
+
</table>
|
391
|
+
---
|
392
|
+
name: with missing cells
|
393
|
+
desc: This is improper formatting, so as long as it doesn't choke, I don't care how it is handled
|
394
|
+
in: |-
|
395
|
+
|a|b|
|
396
|
+
|a|
|
397
|
+
|a|b|
|
398
|
+
html: |-
|
399
|
+
<table>
|
400
|
+
<tr>
|
401
|
+
<td>a</td>
|
402
|
+
<td>b</td>
|
403
|
+
</tr>
|
404
|
+
<tr>
|
405
|
+
<td>a</td>
|
406
|
+
</tr>
|
407
|
+
<tr>
|
408
|
+
<td>a</td>
|
409
|
+
<td>b</td>
|
410
|
+
</tr>
|
411
|
+
</table>
|
412
|
+
---
|
413
|
+
name: with empty cells
|
414
|
+
desc: cells can be empty. Textile2 skips empties, but we don't want to do that.
|
415
|
+
in: |-
|
416
|
+
||b|
|
417
|
+
|a||
|
418
|
+
|a| |
|
419
|
+
html: |-
|
420
|
+
<table>
|
421
|
+
<tr>
|
422
|
+
<td></td>
|
423
|
+
<td>b</td>
|
424
|
+
</tr>
|
425
|
+
<tr>
|
426
|
+
<td>a</td>
|
427
|
+
<td></td>
|
428
|
+
</tr>
|
429
|
+
<tr>
|
430
|
+
<td>a</td>
|
431
|
+
<td> </td>
|
432
|
+
</tr>
|
433
|
+
</table>
|
434
|
+
|