RedCloth 4.1.0-universal-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.

Files changed (59) hide show
  1. data/CHANGELOG +103 -0
  2. data/COPYING +18 -0
  3. data/Manifest +57 -0
  4. data/README +156 -0
  5. data/Rakefile +205 -0
  6. data/RedCloth.gemspec +141 -0
  7. data/bin/redcloth +28 -0
  8. data/ext/mingw-rbconfig.rb +176 -0
  9. data/ext/redcloth_scan/extconf.rb +9 -0
  10. data/ext/redcloth_scan/redcloth.h +164 -0
  11. data/ext/redcloth_scan/redcloth_attributes.c.rl +56 -0
  12. data/ext/redcloth_scan/redcloth_attributes.java.rl +96 -0
  13. data/ext/redcloth_scan/redcloth_attributes.rl +33 -0
  14. data/ext/redcloth_scan/redcloth_common.c.rl +18 -0
  15. data/ext/redcloth_scan/redcloth_common.java.rl +18 -0
  16. data/ext/redcloth_scan/redcloth_common.rl +111 -0
  17. data/ext/redcloth_scan/redcloth_inline.c.rl +159 -0
  18. data/ext/redcloth_scan/redcloth_inline.java.rl +108 -0
  19. data/ext/redcloth_scan/redcloth_inline.rl +157 -0
  20. data/ext/redcloth_scan/redcloth_scan.c.rl +227 -0
  21. data/ext/redcloth_scan/redcloth_scan.java.rl +555 -0
  22. data/ext/redcloth_scan/redcloth_scan.rl +323 -0
  23. data/extras/ragel_profiler.rb +73 -0
  24. data/lib/case_sensitive_require/RedCloth.rb +6 -0
  25. data/lib/redcloth.rb +37 -0
  26. data/lib/redcloth/erb_extension.rb +27 -0
  27. data/lib/redcloth/formatters/base.rb +57 -0
  28. data/lib/redcloth/formatters/html.rb +349 -0
  29. data/lib/redcloth/formatters/latex.rb +249 -0
  30. data/lib/redcloth/formatters/latex_entities.yml +2414 -0
  31. data/lib/redcloth/textile_doc.rb +105 -0
  32. data/lib/redcloth/version.rb +28 -0
  33. data/lib/redcloth_scan.jar +0 -0
  34. data/setup.rb +1585 -0
  35. data/test/basic.yml +870 -0
  36. data/test/code.yml +229 -0
  37. data/test/definitions.yml +82 -0
  38. data/test/extra_whitespace.yml +64 -0
  39. data/test/filter_html.yml +177 -0
  40. data/test/filter_pba.yml +20 -0
  41. data/test/helper.rb +108 -0
  42. data/test/html.yml +305 -0
  43. data/test/images.yml +246 -0
  44. data/test/instiki.yml +38 -0
  45. data/test/links.yml +259 -0
  46. data/test/lists.yml +283 -0
  47. data/test/poignant.yml +89 -0
  48. data/test/sanitize_html.yml +42 -0
  49. data/test/table.yml +267 -0
  50. data/test/test_custom_tags.rb +46 -0
  51. data/test/test_erb.rb +13 -0
  52. data/test/test_extensions.rb +31 -0
  53. data/test/test_formatters.rb +24 -0
  54. data/test/test_parser.rb +73 -0
  55. data/test/test_restrictions.rb +41 -0
  56. data/test/textism.yml +480 -0
  57. data/test/threshold.yml +772 -0
  58. data/test/validate_fixtures.rb +73 -0
  59. metadata +139 -0
@@ -0,0 +1,870 @@
1
+ ---
2
+ name: paragraphs
3
+ desc: Textile looks for paragraphs in your text. Paragraphs are separated by one blank line. Every paragraph is translated as an HTML paragraph.
4
+ in: |-
5
+ A single paragraph.
6
+
7
+ Followed by another.
8
+ html: |-
9
+ <p>A single paragraph.</p>
10
+ <p>Followed by another.</p>
11
+ ---
12
+ name: block containing block start
13
+ in: |-
14
+ I saw a ship. It ate my elephant.
15
+ html: |-
16
+ <p>I saw a ship. It ate my elephant.</p>
17
+ ---
18
+ name: extended block containing block start
19
+ in: |-
20
+ p.. I saw a ship. It ate my elephant.
21
+
22
+ When the elephant comes to take a p. you...
23
+ html: |-
24
+ <p>I saw a ship. It ate my elephant.</p>
25
+ <p>When the elephant comes to take a p. you&#8230;</p>
26
+ ---
27
+ name: blockquote containing block start
28
+ in: |-
29
+ bq. I saw a ship. It ate my elephant.
30
+ html: |-
31
+ <blockquote>
32
+ <p>I saw a ship. It ate my elephant.</p>
33
+ </blockquote>
34
+ ---
35
+ name: extended blockquote containing block start
36
+ in: |-
37
+ bq.. I saw a ship. It ate my elephant.
38
+
39
+ When the elephant comes to take a p. you...
40
+ html: |-
41
+ <blockquote>
42
+ <p>I saw a ship. It ate my elephant.</p>
43
+ <p>When the elephant comes to take a p. you&#8230;</p>
44
+ </blockquote>
45
+ ---
46
+ name: notextile block containing block start
47
+ in: |-
48
+ notextile. I saw a ship. It ate my elephant.
49
+ html: |-
50
+ I saw a ship. It ate my elephant.
51
+ valid_html: false
52
+ ---
53
+ name: extended notextile block containing block start
54
+ in: |-
55
+ notextile.. I saw a ship. It ate my elephant.
56
+
57
+ When the elephant comes to take a p. you...
58
+ html: |-
59
+ I saw a ship. It ate my elephant.
60
+
61
+ When the elephant comes to take a p. you...
62
+ valid_html: false
63
+ ---
64
+ name: pre block containing block start
65
+ in: |-
66
+ pre. I saw a ship. It ate my elephant.
67
+ html: |-
68
+ <pre>I saw a ship. It ate my elephant.</pre>
69
+ ---
70
+ name: extended pre block containing block start
71
+ in: |-
72
+ pre.. I saw a ship. It ate my elephant.
73
+
74
+ When the elephant comes to take a p. you...
75
+ html: |-
76
+ <pre>I saw a ship. It ate my elephant.</pre>
77
+ <pre>When the elephant comes to take a p. you...</pre>
78
+ ---
79
+ name: html tags
80
+ desc: You can certainly use HTML tags inside your Textile documents. HTML will only be escaped if it&#8217;s found in a <code>pre</code> or <code>code</code> block.
81
+ in: |-
82
+ I am <b>very</b> serious.
83
+
84
+ <pre>
85
+ I am <b>very</b> serious.
86
+ </pre>
87
+ html: |-
88
+ <p>I am <b>very</b> serious.</p>
89
+ <pre>
90
+ I am &lt;b&gt;very&lt;/b&gt; serious.
91
+ </pre>
92
+ ---
93
+ name: line breaks
94
+ desc: Line breaks are converted to HTML breaks.
95
+ in: |-
96
+ I spoke.
97
+ And none replied.
98
+ html: |-
99
+ <p>I spoke.<br />
100
+ And none replied.</p>
101
+ html_no_breaks: |-
102
+ <p>I spoke.
103
+ And none replied.</p>
104
+ lite_mode_html: |-
105
+ I spoke.<br />
106
+ And none replied.
107
+ ---
108
+ name: curly quotes
109
+ desc: Single- and double-quotes around words or phrases are converted to curly quotations, much easier on the eye.
110
+ in: "\"Observe!\""
111
+ html: <p>&#8220;Observe!&#8221;</p>
112
+ ---
113
+ name: quotes contained in multi-paragraph quotes
114
+ in: |-
115
+ "I first learned about this thing called "Redcloth" several years ago.
116
+
117
+ "It's wonderful."
118
+ html: |-
119
+ <p>&#8220;I first learned about this thing called &#8220;Redcloth&#8221; several years ago.</p>
120
+ <p>&#8220;It&#8217;s wonderful.&#8221;</p>
121
+ ---
122
+ name: double hyphens
123
+ desc: Double hyphens are replaced with an em-dash.
124
+ in: Observe--very nice!
125
+ html: <p>Observe&#8212;very nice!</p>
126
+ latex: "Observe---very nice!\n\n"
127
+ ---
128
+ name: double hyphens with spaces
129
+ desc: Double hyphens are replaced with an em-dash and surrounding spaces are preserved.
130
+ in: Observe -- very nice!
131
+ html: <p>Observe &#8212; very nice!</p>
132
+ latex: "Observe --- very nice!\n\n"
133
+ ---
134
+ name: parenthetical phrase set off with em dashes
135
+ desc: Sentences with two em dashes should not turn them into strikethroughs
136
+ in: An emdash indicates a parenthetical thought--like this one--which is set apart from the rest of a sentence.
137
+ html: "<p>An emdash indicates a parenthetical thought&#8212;like this one&#8212;which is set apart from the rest of a sentence.</p>"
138
+ latex: "An emdash indicates a parenthetical thought---like this one---which is set apart from the rest of a sentence.\n\n"
139
+ ---
140
+ name: parenthetical phrase set off with em dashes surrounded by spaces
141
+ desc: Sentences with two em dashes should not turn them into strikethroughs
142
+ in: An emdash indicates a parenthetical thought -- like this one -- which is set apart from the rest of a sentence.
143
+ html: "<p>An emdash indicates a parenthetical thought &#8212; like this one &#8212; which is set apart from the rest of a sentence.</p>"
144
+ latex: "An emdash indicates a parenthetical thought --- like this one --- which is set apart from the rest of a sentence.\n\n"
145
+ ---
146
+ name: single hyphens with spaces
147
+ desc: Single hyphens are replaced with en-dashes if they are surrounded by spaces.
148
+ in: Observe - tiny and brief.
149
+ html: <p>Observe &#8211; tiny and brief.</p>
150
+ latex: "Observe--tiny and brief.\n\n"
151
+ ---
152
+ name: midword hyphens
153
+ desc: Single hyphens are left alone if not surrounded by spaces.
154
+ in: Observe the nicely-done hyphen.
155
+ html: <p>Observe the nicely-done hyphen.</p>
156
+ ---
157
+ name: ellipses
158
+ desc: Triplets of periods become an ellipsis.
159
+ in: Observe...
160
+ html: <p>Observe&#8230;</p>
161
+ lite_mode_html: Observe&#8230;
162
+ ---
163
+ name: dimension sign
164
+ desc: The letter 'x' becomes a dimension sign when used between digits.
165
+ in: "Observe: 2x3."
166
+ html: "<p>Observe: 2&#215;3.</p>"
167
+ ---
168
+ name: dimension sign with space after
169
+ in: "The room is 2x3 inches big."
170
+ html: "<p>The room is 2&#215;3 inches big.</p>"
171
+ ---
172
+ name: dimension sign with spaces
173
+ in: "Observe: 2 x 4."
174
+ html: "<p>Observe: 2 &#215; 4.</p>"
175
+ ---
176
+ name: dimension signs chained
177
+ in: "Observe: 2x3x4."
178
+ html: "<p>Observe: 2&#215;3&#215;4.</p>"
179
+ lite_mode_html: "Observe: 2&#215;3&#215;4."
180
+ ---
181
+ name: dimension signs with double primes
182
+ in: 'My mouse: 2.5" x 4".'
183
+ html: '<p>My mouse: 2.5&#8243; &#215; 4&#8243;.</p>'
184
+ ---
185
+ name: dimension signs with single primes
186
+ in: "My office: 5' x 4.5'."
187
+ html: "<p>My office: 5&#8242; &#215; 4.5&#8242;.</p>"
188
+ ---
189
+ name: trademark and copyright
190
+ desc: Conversion of trademark and copyright symbols.
191
+ in: one(TM), two(R), three(C).
192
+ html: <p>one&#8482;, two&#174;, three&#169;.</p>
193
+ lite_mode_html: one&#8482;, two&#174;, three&#169;.
194
+ ---
195
+ name: headers
196
+ desc: To make an entire paragraph into a Header, place “h<em>n</em>.” at its beginning, where <em>n</em> is a number from 1-6.
197
+ in: h3. Header 3
198
+ html: <h3>Header 3</h3>
199
+ ---
200
+ name: blockquote
201
+ desc: To make an entire paragraph into a block quotation, place “bq.” before it.
202
+ in: |-
203
+ Any old text
204
+
205
+ bq. A block quotation.
206
+
207
+ Any old text
208
+ html: |-
209
+ <p>Any old text</p>
210
+ <blockquote>
211
+ <p>A block quotation.</p>
212
+ </blockquote>
213
+ <p>Any old text</p>
214
+ ---
215
+ name: footnote reference
216
+ desc: Numeric references within text to footnotes appear between square brackets.
217
+ in: This is covered elsewhere[1].
218
+ html: <p>This is covered elsewhere<sup class="footnote"><a href="#fn1">1</a></sup>.</p>
219
+ ---
220
+ name: footnote
221
+ desc: To create the footnote that corresponds to its reference within the text, begin a new paragraph with fn and the footnote&#8217;s number, followed by a dot and a space.
222
+ in: fn1. Down here, in fact.
223
+ html: <p class="footnote" id="fn1"><sup>1</sup> Down here, in fact.</p>
224
+ ---
225
+ name: em
226
+ desc: Emphasis to text is added by surrounding a phrase with underscores. In HTML, this often appears as <em>italics</em>.
227
+ in: I _believe_ every word.
228
+ html: <p>I <em>believe</em> every word.</p>
229
+ lite_mode_html: "I <em>believe</em> every word."
230
+ ---
231
+ name: strong
232
+ desc: Strength can be give to text by surrounding with asterisks. In HTML, this strength appears as <strong>bold</strong>.
233
+ in: And then? She *fell*!
234
+ html: <p>And then? She <strong>fell</strong>!</p>
235
+ lite_mode_html: "And then? She <strong>fell</strong>!"
236
+ ---
237
+ name: strong phrase beginning with a number
238
+ desc: A strong phrase at the beginning of a line that begins with a number should not be recognized as a ul with a start value (no such thing)
239
+ in: "*10 times as many*"
240
+ html: "<p><strong>10 times as many</strong></p>"
241
+ ---
242
+ name: force bold italics
243
+ desc: Both italics and bold can be forced by doubling the underscores or asterisks.
244
+ in: |-
245
+ I __know__.
246
+ I **really** __know__.
247
+ html: |-
248
+ <p>I <i>know</i>.<br />
249
+ I <b>really</b> <i>know</i>.</p>
250
+ ---
251
+ name: citation
252
+ desc: Use double question marks to indicate <em>citation</em>. The title of a book, for instance.
253
+ in: ??Cat's Cradle?? by Vonnegut
254
+ html: <p><cite>Cat&#8217;s Cradle</cite> by Vonnegut</p>
255
+ ---
256
+ name: code phrases
257
+ desc: Code phrases can be surrounded by at-symbols.
258
+ in: Convert with @r.to_html@
259
+ html: <p>Convert with <code>r.to_html</code></p>
260
+ lite_mode_html: Convert with <code>r.to_html</code>
261
+ ---
262
+ name: code phrases not created with multiple email addresses
263
+ in: Please email why@domain.com or jason@domain.com.
264
+ html: <p>Please email why@domain.com or jason@domain.com.</p>
265
+ ---
266
+ name: del
267
+ desc: To indicate a passage which has been deleted, surround the passage with hypens.
268
+ in: I'm -sure- not sure.
269
+ html: <p>I&#8217;m <del>sure</del> not sure.</p>
270
+ ---
271
+ name: ins
272
+ desc: Pluses around a passage indicate its insertion.
273
+ in: You are a +pleasant+ child.
274
+ html: <p>You are a <ins>pleasant</ins> child.</p>
275
+ ---
276
+ name: superscript
277
+ desc: To superscript a phrase, surround with carets.
278
+ in: a ^2^ + b ^2^ = c ^2^
279
+ html: <p>a <sup>2</sup> + b <sup>2</sup> = c <sup>2</sup></p>
280
+ ---
281
+ name: parenthetical superscript phrase
282
+ in: '^(image courtesy NASA)^'
283
+ html: '<p><sup>(image courtesy <span class="caps">NASA</span>)</sup></p>'
284
+ ---
285
+ name: subscript
286
+ desc: To subscript, surround with tildes.
287
+ in: log ~2~ x
288
+ html: <p>log <sub>2</sub> x</p>
289
+ ---
290
+ name: parenthetical subscript phrase
291
+ in: '~(image courtesy NASA)~'
292
+ html: '<p><sub>(image courtesy <span class="caps">NASA</span>)</sub></p>'
293
+ ---
294
+ name: tight superscript and subscript
295
+ desc: if you want your superscript or subscript to not be surrounded by spaces, you must use square brackets
296
+ in: f(x, n) = log[~4~]x[^n^]
297
+ html: '<p>f(x, n) = log<sub>4</sub>x<sup>n</sup></p>'
298
+ ---
299
+ name: span
300
+ desc: Lastly, if you find yourself needing to customize the style of a passage, use percent symbols to translate the passage as an HTML span.
301
+ in: I'm %unaware% of most soft drinks.
302
+ html: <p>I&#8217;m <span>unaware</span> of most soft drinks.</p>
303
+ ---
304
+ name: style span
305
+ desc: This way, you can apply style settings, as described in the next section to arbitrary phrases.
306
+ in: |-
307
+ I'm %{color:red}unaware%
308
+ of most soft drinks.
309
+ html: |-
310
+ <p>I&#8217;m <span style="color:red;">unaware</span><br />
311
+ of most soft drinks.</p>
312
+ lite_mode_html: |-
313
+ I&#8217;m <span style="color:red;">unaware</span><br />
314
+ of most soft drinks.
315
+ ---
316
+ name: percent sign
317
+ desc: though percent signs indicate a span, they shouldn't be overly greedy.
318
+ in: |-
319
+ http://blah.com/one%20two%20three
320
+ (min)5%-95%(max)
321
+ html: |-
322
+ <p>http://blah.com/one%20two%20three<br />
323
+ (min)5%-95%(max)</p>
324
+ ---
325
+ name: css class
326
+ desc: A block can be tagged with a CSS class by circling the class in parentheses and placing it just before the period which marks the block.
327
+ in: p(example1). An example
328
+ html: <p class="example1">An example</p>
329
+ ---
330
+ name: css id
331
+ desc: An element ID can be given by prefixing the ID with a pound symbol and using it in place of the class.
332
+ in: p(#big-red). Red here
333
+ html: <p id="big-red">Red here</p>
334
+ ---
335
+ name: class and id combined
336
+ desc: Class and ID can be combined by placing the class first.
337
+ in: p(example1#big-red2). Red here
338
+ html: <p class="example1" id="big-red2">Red here</p>
339
+ ---
340
+ name: css style
341
+ desc: Style settings can be provided directly by surrounding them in curly braces.
342
+ in: p{color:blue;margin:30px}. Spacey blue
343
+ html: <p style="color:blue;margin:30px;">Spacey blue</p>
344
+ ---
345
+ name: language designations
346
+ desc: Language designations can be given between angel brackets.
347
+ in: p[fr]. rouge
348
+ html: <p lang="fr">rouge</p>
349
+ ---
350
+ name: block attributes on phrase modifiers
351
+ desc: All block attributes can be applied to phrases as well by placing them just inside the opening modifier.
352
+ in: |-
353
+ I seriously *{color:red}blushed*
354
+ when I _(big)sprouted_ that
355
+ corn stalk from my
356
+ %[es]cabeza%.
357
+ html: |-
358
+ <p>I seriously <strong style="color:red;">blushed</strong><br />
359
+ when I <em class="big">sprouted</em> that<br />
360
+ corn stalk from my<br />
361
+ <span lang="es">cabeza</span>.</p>
362
+ ---
363
+ name: inline attributes preceded by text are treated as literal
364
+ desc: modifiers must come first, without anything before them
365
+ in: |-
366
+ I *seriously {color:red}blushed*
367
+ when I _first (big)sprouted_ that
368
+ corn stalk from my
369
+ %grande [es]cabeza%.
370
+ html: |-
371
+ <p>I <strong>seriously {color:red}blushed</strong><br />
372
+ when I <em>first (big)sprouted</em> that<br />
373
+ corn stalk from my<br />
374
+ <span>grande [es]cabeza</span>.</p>
375
+ ---
376
+ name: align justified
377
+ desc: Text inside blocks can be aligned in four basic ways.
378
+ in: p<>. justified
379
+ html: <p style="text-align:justify;">justified</p>
380
+ ---
381
+ name: indentation
382
+ desc: Indentation can also be specified by provide a single left paren for every 1em to the left. A single right paren for every 1em to the right.
383
+ in: p))). right ident 3em
384
+ html: <p style="padding-right:3em;">right ident 3em</p>
385
+ ---
386
+ name: indentation and alignment
387
+ desc: Identation may be coupled with alignment.
388
+ in: h2()>. Bingo.
389
+ html: <h2 style="padding-left:1em;padding-right:1em;text-align:right;">Bingo.</h2>
390
+ ---
391
+ name: many modifiers combined
392
+ desc: And, furthermore, coupled with language settings and CSS styles.
393
+ in: h3()>[no]{color:red}. Bingo
394
+ html: <h3 style="padding-left:1em;padding-right:1em;text-align:right;color:red;" lang="no">Bingo</h3>
395
+ ---
396
+ name: code blocks
397
+ desc: For example, long code blocks belong between <code>pre</code> and <code>code</code> tags. Please also indent your code inside the tags to be sure that all Textile processors out there will ignore the contents.
398
+ in: |
399
+ <pre>
400
+ <code>
401
+ a.gsub!( /</, '' )
402
+ </code>
403
+ </pre>
404
+ html: |-
405
+ <pre>
406
+ <code>
407
+ a.gsub!( /&lt;/, '' )
408
+ </code>
409
+ </pre>
410
+ ---
411
+ name: div tags
412
+ desc: You may also choose to surround sections with <code>div</code> tags to separate your document into sections. <a href="http://www.instiki.org/">Instiki</a> uses this technique to float a sidebar to the right.
413
+ in: |
414
+ <div style="float:right;">
415
+
416
+ h3. Sidebar
417
+
418
+ "Hobix":http://hobix.com/
419
+ "Ruby":http://ruby-lang.org/
420
+
421
+ </div>
422
+
423
+ The main text of the page goes here and will stay to the left of the sidebar.
424
+ html: |-
425
+ <div style="float:right;">
426
+ <h3>Sidebar</h3>
427
+ <p><a href="http://hobix.com/">Hobix</a><br />
428
+ <a href="http://ruby-lang.org/">Ruby</a></p>
429
+ </div>
430
+ <p>The main text of the page goes here and will stay to the left of the sidebar.</p>
431
+ ---
432
+ name: numbered list
433
+ desc: To make a numbered list, place each item in its own paragraph, preceded by &#8221;#&#8221;.
434
+ in: |-
435
+ # A first item
436
+ # A second item
437
+ # A third
438
+ html: |-
439
+ <ol>
440
+ <li>A first item</li>
441
+ <li>A second item</li>
442
+ <li>A third</li>
443
+ </ol>
444
+ ---
445
+ name: nested numbered lists
446
+ desc: These lists may be nested by increasing the number of pound symbols preceding child entries.
447
+ in: |-
448
+ # Fuel could be:
449
+ ## Coal
450
+ ## Gasoline
451
+ ## Electricity
452
+ # Humans need only:
453
+ ## Water
454
+ ## Protein
455
+ html: |-
456
+ <ol>
457
+ <li>Fuel could be:
458
+ <ol>
459
+ <li>Coal</li>
460
+ <li>Gasoline</li>
461
+ <li>Electricity</li>
462
+ </ol></li>
463
+ <li>Humans need only:
464
+ <ol>
465
+ <li>Water</li>
466
+ <li>Protein</li>
467
+ </ol></li>
468
+ </ol>
469
+ ---
470
+ name: bulleted list
471
+ desc: Bulleted lists use an asterisk in place of the pound.
472
+ in: |-
473
+ * A first item
474
+ * A second item
475
+ * A third
476
+ html: |-
477
+ <ul>
478
+ <li>A first item</li>
479
+ <li>A second item</li>
480
+ <li>A third</li>
481
+ </ul>
482
+ ---
483
+ name: nested bulleted lists
484
+ desc: These lists may be nested in like manner.
485
+ in: |-
486
+ * Fuel could be:
487
+ ** Coal
488
+ ** Gasoline
489
+ ** Electricity
490
+ * Humans need only:
491
+ ** Water
492
+ ** Protein
493
+ html: |-
494
+ <ul>
495
+ <li>Fuel could be:
496
+ <ul>
497
+ <li>Coal</li>
498
+ <li>Gasoline</li>
499
+ <li>Electricity</li>
500
+ </ul></li>
501
+ <li>Humans need only:
502
+ <ul>
503
+ <li>Water</li>
504
+ <li>Protein</li>
505
+ </ul></li>
506
+ </ul>
507
+ ---
508
+ name: links
509
+ desc: Basic links are comprised of a phrase which is linked to a <acronym title="Universal Resource Locator">URL</acronym>. Place the descriptive phrase in quotation marks. Follow it immediately by a colon and the URL.
510
+ in: I searched "Google":http://google.com.
511
+ html: <p>I searched <a href="http://google.com">Google</a>.</p>
512
+ lite_mode_html: I searched <a href="http://google.com">Google</a>.
513
+ ---
514
+ name: link aliases
515
+ desc: If you are using the same link several times in your document, or you’d just like to be a tad more organized, you can use a link alias. Place the URL anywhere in your document, beginning with its alias in square brackets. Then, use the alias in place of the URL, using the link format above.
516
+ in: |-
517
+ I am crazy about "Hobix":hobix
518
+ and "it's":hobix "all":hobix I ever
519
+ "link to":hobix!
520
+
521
+ [hobix]http://hobix.com
522
+ html: |-
523
+ <p>I am crazy about <a href="http://hobix.com">Hobix</a><br />
524
+ and <a href="http://hobix.com">it&#8217;s</a> <a href="http://hobix.com">all</a> I ever<br />
525
+ <a href="http://hobix.com">link to</a>!</p>
526
+ ---
527
+ name: image
528
+ desc: You can embed an image in your Textile document by surrounding its URL with exclamation marks.
529
+ in: "!http://hobix.com/sample.jpg!"
530
+ html: <p><img src="http://hobix.com/sample.jpg" alt="" /></p>
531
+ lite_mode_html: <img src="http://hobix.com/sample.jpg" alt="" />
532
+ ---
533
+ name: image title
534
+ desc: A title for the image can also be provided in parens, just before the closing exclamation.
535
+ in: "!openwindow1.gif(Bunny.)!"
536
+ html: <p><img src="openwindow1.gif" title="Bunny." alt="Bunny." /></p>
537
+ ---
538
+ name: image links
539
+ desc: Links can be attached to images with a colon.
540
+ in: "!openwindow1.gif!:http://hobix.com/"
541
+ html: <p><a href="http://hobix.com/"><img src="openwindow1.gif" alt="" /></a></p>
542
+ ---
543
+ name: image alignments
544
+ desc: Alignments can be applied as well to images.
545
+ in: |-
546
+ !>obake.gif!
547
+
548
+ And others sat all round the small
549
+ machine and paid it to sing to them.
550
+ html: |-
551
+ <p style="float:right;"><img src="obake.gif" alt="" /></p>
552
+ <p>And others sat all round the small<br />
553
+ machine and paid it to sing to them.</p>
554
+ ---
555
+ name: acronym definitions
556
+ desc: Definitions for acronyms can be provided by following an acronym with its definition in parens.
557
+ in: We use CSS(Cascading Style Sheets).
558
+ html: <p>We use <acronym title="Cascading Style Sheets"><span class="caps">CSS</span></acronym>.</p>
559
+ lite_mode_html: We use <acronym title="Cascading Style Sheets"><span class="caps">CSS</span></acronym>.
560
+ no_span_caps_html: <p>We use <acronym title="Cascading Style Sheets">CSS</acronym>.</p>
561
+ ---
562
+ name: tables
563
+ desc: Simple tables can be built by separating fields with pipe characters
564
+ in: |-
565
+ | name | age | sex |
566
+ | joan | 24 | f |
567
+ | archie | 29 | m |
568
+ | bella | 45 | f |
569
+ html: |-
570
+ <table>
571
+ <tr>
572
+ <td> name </td>
573
+ <td> age </td>
574
+ <td> sex </td>
575
+ </tr>
576
+ <tr>
577
+ <td> joan </td>
578
+ <td> 24 </td>
579
+ <td> f </td>
580
+ </tr>
581
+ <tr>
582
+ <td> archie </td>
583
+ <td> 29 </td>
584
+ <td> m </td>
585
+ </tr>
586
+ <tr>
587
+ <td> bella </td>
588
+ <td> 45 </td>
589
+ <td> f </td>
590
+ </tr>
591
+ </table>
592
+ ---
593
+ name: table headers
594
+ desc: Specify header cells by marking them with an underscore and period.
595
+ in: |-
596
+ |_. name |_. age |_. sex |
597
+ | joan | 24 | f |
598
+ | archie | 29 | m |
599
+ | bella | 45 | f |
600
+ html: |-
601
+ <table>
602
+ <tr>
603
+ <th>name </th>
604
+ <th>age </th>
605
+ <th>sex </th>
606
+ </tr>
607
+ <tr>
608
+ <td> joan </td>
609
+ <td> 24 </td>
610
+ <td> f </td>
611
+ </tr>
612
+ <tr>
613
+ <td> archie </td>
614
+ <td> 29 </td>
615
+ <td> m </td>
616
+ </tr>
617
+ <tr>
618
+ <td> bella </td>
619
+ <td> 45 </td>
620
+ <td> f </td>
621
+ </tr>
622
+ </table>
623
+ ---
624
+ name: table cell attributes
625
+ desc: The period used above marks the end of a cell’s attributes. Other attributes can be applied as well.
626
+ in: |-
627
+ |_. attribute list |
628
+ |<. align left |
629
+ |>. align right|
630
+ |=. center |
631
+ |<>. justify |
632
+ |^. valign top |
633
+ |~. bottom |
634
+ html: |-
635
+ <table>
636
+ <tr>
637
+ <th>attribute list </th>
638
+ </tr>
639
+ <tr>
640
+ <td style="text-align:left;">align left </td>
641
+ </tr>
642
+ <tr>
643
+ <td style="text-align:right;">align right</td>
644
+ </tr>
645
+ <tr>
646
+ <td style="text-align:center;">center </td>
647
+ </tr>
648
+ <tr>
649
+ <td style="text-align:justify;">justify </td>
650
+ </tr>
651
+ <tr>
652
+ <td style="vertical-align:top;">valign top </td>
653
+ </tr>
654
+ <tr>
655
+ <td style="vertical-align:bottom;">bottom </td>
656
+ </tr>
657
+ </table>
658
+ ---
659
+ name: table colspan
660
+ desc: You can also specify colspans with a backslash, followed by the cell width.
661
+ in: |-
662
+ |\2. spans two cols |
663
+ | col 1 | col 2 |
664
+ html: |-
665
+ <table>
666
+ <tr>
667
+ <td colspan="2">spans two cols </td>
668
+ </tr>
669
+ <tr>
670
+ <td> col 1 </td>
671
+ <td> col 2 </td>
672
+ </tr>
673
+ </table>
674
+ ---
675
+ name: table rowspan
676
+ desc: Rowspan is specified by a forward slash, followed by the row height.
677
+ in: |-
678
+ |/3. spans 3 rows | a |
679
+ | b |
680
+ | c |
681
+ html: |-
682
+ <table>
683
+ <tr>
684
+ <td rowspan="3">spans 3 rows </td>
685
+ <td> a </td>
686
+ </tr>
687
+ <tr>
688
+ <td> b </td>
689
+ </tr>
690
+ <tr>
691
+ <td> c </td>
692
+ </tr>
693
+ </table>
694
+ ---
695
+ name: block attributes applied to table cells
696
+ desc: All block attributes can be applied to table cells as well.
697
+ in: "|{background:#ddd}. Grey cell|"
698
+ html: |-
699
+ <table>
700
+ <tr>
701
+ <td style="background:#ddd;">Grey cell</td>
702
+ </tr>
703
+ </table>
704
+ ---
705
+ name: black attributes applied to a table
706
+ desc: Table-wide attributes can be applied before the first row of the table. On its own line, followed by a period.
707
+ in: |-
708
+ table{border:1px solid black}.
709
+ |This|is|a|row|
710
+ |This|is|a|row|
711
+ html: |-
712
+ <table style="border:1px solid black;">
713
+ <tr>
714
+ <td>This</td>
715
+ <td>is</td>
716
+ <td>a</td>
717
+ <td>row</td>
718
+ </tr>
719
+ <tr>
720
+ <td>This</td>
721
+ <td>is</td>
722
+ <td>a</td>
723
+ <td>row</td>
724
+ </tr>
725
+ </table>
726
+ ---
727
+ name: black attributes applied to a table row
728
+ desc: Attributes can be applied to a single row by supplying the attribute before the row starts, using a <code>table</code> modifier and following it by a period.
729
+ in: |-
730
+ |This|is|a|row|
731
+ {background:#ddd}. |This|is|grey|row|
732
+ html: |-
733
+ <table>
734
+ <tr>
735
+ <td>This</td>
736
+ <td>is</td>
737
+ <td>a</td>
738
+ <td>row</td>
739
+ </tr>
740
+ <tr style="background:#ddd;">
741
+ <td>This</td>
742
+ <td>is</td>
743
+ <td>grey</td>
744
+ <td>row</td>
745
+ </tr>
746
+ </table>
747
+ ---
748
+ name: extended block followed by pre block
749
+ in: |-
750
+ div.. Just a test.
751
+
752
+ Second div.
753
+
754
+ pre. A pre block ends it.
755
+ html: |-
756
+ <div>Just a test.</div>
757
+ <div>Second div.</div>
758
+ <pre>A pre block ends it.</pre>
759
+ ---
760
+ name: extended block followed by blockquote
761
+ in: |-
762
+ div.. Just a test.
763
+
764
+ Second div.
765
+
766
+ bq. A blockquote ends it.
767
+ html: |-
768
+ <div>Just a test.</div>
769
+ <div>Second div.</div>
770
+ <blockquote>
771
+ <p>A blockquote ends it.</p>
772
+ </blockquote>
773
+ ---
774
+ name: extended block followed by block code
775
+ in: |-
776
+ div.. Just a test.
777
+
778
+ Second div.
779
+
780
+ bc. A blockcode ends it.
781
+ html: |-
782
+ <div>Just a test.</div>
783
+ <div>Second div.</div>
784
+ <pre><code>A blockcode ends it.</code></pre>
785
+ ---
786
+ name: extended block followed by notextile block
787
+ in: |-
788
+ div.. Just a test.
789
+
790
+ Second div.
791
+
792
+ notextile. A notextile block ends it.
793
+ html: |-
794
+ <div>Just a test.</div>
795
+ <div>Second div.</div>
796
+ A notextile block ends it.
797
+ valid_html: false
798
+ ---
799
+ name: simple parentheses
800
+ in: |-
801
+ before (in parens) after
802
+ html: |-
803
+ <p>before (in parens) after</p>
804
+ ---
805
+ name: parentheses in underscores
806
+ in: |-
807
+ before _(in parens)_ after
808
+ html: |-
809
+ <p>before <em>(in parens)</em> after</p>
810
+ ---
811
+ name: parentheses in asterisks
812
+ in: |-
813
+ before *(in parens)* after
814
+ html: |-
815
+ <p>before <strong>(in parens)</strong> after</p>
816
+ ---
817
+ name: parentheses in underscores in quotes
818
+ in: |-
819
+ "before _(in parens)_ after"
820
+ html: |-
821
+ <p>&#8220;before <em>(in parens)</em> after&#8221;</p>
822
+ ---
823
+ name: underscores in parentheses
824
+ in: |-
825
+ one _two three_ (four _five six_) seven
826
+ html: |-
827
+ <p>one <em>two three</em> (four <em>five six</em>) seven</p>
828
+ ---
829
+ name: underscores in parentheses in quotes
830
+ in: |-
831
+ "one _two three_ (four _five six_) seven"
832
+ html: |-
833
+ <p>&#8220;one <em>two three</em> (four <em>five six</em>) seven&#8221;</p>
834
+ ---
835
+ name: underscores in parentheses 2
836
+ in: |-
837
+ one (two _three four_) five
838
+ html: |-
839
+ <p>one (two <em>three four</em>) five</p>
840
+ ---
841
+ name: underscores in parentheses in quotes 2
842
+ in: |-
843
+ "one (two _three four_) five"
844
+ html: |-
845
+ <p>&#8220;one (two <em>three four</em>) five&#8221;</p>
846
+ ---
847
+ name: caps in parentheses
848
+ desc: Uppercase words of three or more characters that are in parentheses should be recognized as well as those not in parentheses.
849
+ in: IBM or (HAL)
850
+ html: <p><span class="caps">IBM</span> or (<span class="caps">HAL</span>)</p>
851
+ no_span_caps_html: <p>IBM or (HAL)</p>
852
+ ---
853
+ name: phrase modifiers in parentheses
854
+ desc: Inline modifiers are expected to work in parentheses as well.
855
+ in: |-
856
+ __Amanita__s are mushrooms.
857
+ Lungworts (__Lobaria__) are lichens.
858
+ Blah blah (normal text **bold**) blah.
859
+ html: |-
860
+ <p>__Amanita__s are mushrooms.<br />
861
+ Lungworts (<i>Lobaria</i>) are lichens.<br />
862
+ Blah blah (normal text <b>bold</b>) blah.</p>
863
+ ---
864
+ name: square brackets are preserved
865
+ in: |-
866
+ citation ["(Berk.) Hilton"], see
867
+ [Papers "blah blah."]
868
+ html: |-
869
+ <p>citation [&#8220;(Berk.) Hilton&#8221;], see<br />
870
+ [Papers &#8220;blah blah.&#8221;]</p>