parity-RedCloth 4.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gemtest +0 -0
- data/.rspec +1 -0
- data/CHANGELOG +265 -0
- data/COPYING +18 -0
- data/Gemfile +7 -0
- data/README.rdoc +215 -0
- data/Rakefile +18 -0
- data/bin/redcloth +28 -0
- data/doc/textile_reference.html +631 -0
- data/ext/redcloth_scan/extconf.rb +6 -0
- data/ext/redcloth_scan/redcloth.h +220 -0
- data/ext/redcloth_scan/redcloth_attributes.c +650 -0
- data/ext/redcloth_scan/redcloth_inline.c +8153 -0
- data/ext/redcloth_scan/redcloth_scan.c +24407 -0
- data/lib/case_sensitive_require/RedCloth.rb +6 -0
- data/lib/redcloth/erb_extension.rb +27 -0
- data/lib/redcloth/formatters/base.rb +63 -0
- data/lib/redcloth/formatters/html.rb +352 -0
- data/lib/redcloth/formatters/latex.rb +331 -0
- data/lib/redcloth/formatters/latex_entities.yml +2414 -0
- data/lib/redcloth/textile_doc.rb +113 -0
- data/lib/redcloth/version.rb +34 -0
- data/lib/redcloth.rb +45 -0
- data/lib/tasks/pureruby.rake +17 -0
- data/redcloth.gemspec +54 -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 +79 -0
- metadata +239 -0
@@ -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
|
+
|