RedCloth 4.2.4.pre2-x86-mingw32

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 (66) hide show
  1. data/.gitignore +25 -0
  2. data/.rspec +1 -0
  3. data/.rvmrc +1 -0
  4. data/CHANGELOG +232 -0
  5. data/COPYING +18 -0
  6. data/Gemfile +2 -0
  7. data/Gemfile.lock +33 -0
  8. data/Manifest +52 -0
  9. data/README +196 -0
  10. data/Rakefile +10 -0
  11. data/bin/redcloth +28 -0
  12. data/doc/textile_reference.html +631 -0
  13. data/ext/redcloth_scan/redcloth.h +220 -0
  14. data/lib/case_sensitive_require/RedCloth.rb +6 -0
  15. data/lib/redcloth.rb +44 -0
  16. data/lib/redcloth/erb_extension.rb +27 -0
  17. data/lib/redcloth/formatters/base.rb +63 -0
  18. data/lib/redcloth/formatters/html.rb +345 -0
  19. data/lib/redcloth/formatters/latex.rb +322 -0
  20. data/lib/redcloth/formatters/latex_entities.yml +2414 -0
  21. data/lib/redcloth/textile_doc.rb +103 -0
  22. data/lib/redcloth/version.rb +34 -0
  23. data/lib/tasks/pureruby.rake +17 -0
  24. data/redcloth.gemspec +48 -0
  25. data/setup.rb +1585 -0
  26. data/spec/benchmark_spec.rb +15 -0
  27. data/spec/custom_tags_spec.rb +50 -0
  28. data/spec/erb_spec.rb +10 -0
  29. data/spec/extension_spec.rb +26 -0
  30. data/spec/fixtures/basic.yml +1028 -0
  31. data/spec/fixtures/code.yml +257 -0
  32. data/spec/fixtures/definitions.yml +82 -0
  33. data/spec/fixtures/extra_whitespace.yml +64 -0
  34. data/spec/fixtures/filter_html.yml +177 -0
  35. data/spec/fixtures/filter_pba.yml +20 -0
  36. data/spec/fixtures/html.yml +340 -0
  37. data/spec/fixtures/images.yml +279 -0
  38. data/spec/fixtures/instiki.yml +38 -0
  39. data/spec/fixtures/links.yml +291 -0
  40. data/spec/fixtures/lists.yml +462 -0
  41. data/spec/fixtures/poignant.yml +89 -0
  42. data/spec/fixtures/sanitize_html.yml +42 -0
  43. data/spec/fixtures/table.yml +434 -0
  44. data/spec/fixtures/textism.yml +509 -0
  45. data/spec/fixtures/threshold.yml +762 -0
  46. data/spec/formatters/class_filtered_html_spec.rb +7 -0
  47. data/spec/formatters/filtered_html_spec.rb +7 -0
  48. data/spec/formatters/html_no_breaks_spec.rb +9 -0
  49. data/spec/formatters/html_spec.rb +13 -0
  50. data/spec/formatters/id_filtered_html_spec.rb +7 -0
  51. data/spec/formatters/latex_spec.rb +13 -0
  52. data/spec/formatters/lite_mode_html_spec.rb +7 -0
  53. data/spec/formatters/no_span_caps_html_spec.rb +7 -0
  54. data/spec/formatters/sanitized_html_spec.rb +7 -0
  55. data/spec/formatters/style_filtered_html_spec.rb +7 -0
  56. data/spec/parser_spec.rb +95 -0
  57. data/spec/spec_helper.rb +36 -0
  58. data/tasks/compile.rake +47 -0
  59. data/tasks/gems.rake +38 -0
  60. data/tasks/ragel_extension_task.rb +127 -0
  61. data/tasks/release.rake +15 -0
  62. data/tasks/rspec.rake +11 -0
  63. data/tasks/rvm.rake +43 -0
  64. data/test/ragel_profiler.rb +73 -0
  65. data/test/validate_fixtures.rb +74 -0
  66. metadata +218 -0
@@ -0,0 +1,762 @@
1
+ --- # From http://thresholdstate.com/articles/4312/the-textile-reference-manual
2
+ name: paragraph
3
+ desc: Paragraphs are separated by blank lines. Each paragraph of text is transformed into a XHTML <p> paragraph block.
4
+ in: |-
5
+ A paragraph.
6
+
7
+ Another paragraph.
8
+ html: |-
9
+ <p>A paragraph.</p>
10
+ <p>Another paragraph.</p>
11
+ ---
12
+ name: line breaks
13
+ desc: Line breaks within paragraphs are transformed into XHTML line breaks.
14
+ in: |-
15
+ A paragraph with
16
+ a line break.
17
+ html: |-
18
+ <p>A paragraph with<br />
19
+ a line break.</p>
20
+ ---
21
+ name: xhtml tags
22
+ desc: Simple XHTML tags may be included in a paragraph.
23
+ in: Here's some <b>bold</b> text.
24
+ html: <p>Here&#8217;s some <b>bold</b> text.</p>
25
+ ---
26
+ name: no paragraph tags
27
+ desc: A line beginning with a space will be left untouched, and not wrapped in <p> tags.
28
+ in: " No paragraph tags here."
29
+ html: "No paragraph tags here."
30
+ valid_html: false
31
+ ---
32
+ name: smart quotes
33
+ desc: Single and double typewriter quotation marks ' and " are transformed into typographically correct “curly” quote marks.
34
+ in: '"Proceed!" said he to the host.'
35
+ html: '<p>&#8220;Proceed!&#8221; said he to the host.</p>'
36
+ ---
37
+ name: smart quotes 2
38
+ in: "'Proceed!' said he to the host."
39
+ html: "<p>&#8216;Proceed!&#8217; said he to the host.</p>"
40
+ ---
41
+ name: nested quotation marks
42
+ desc: Single and double quotation marks may be nested one inside the other.
43
+ in: |-
44
+ "'I swear, captain,' replied I."
45
+ html: |-
46
+ <p>&#8220;&#8216;I swear, captain,&#8217; replied I.&#8221;</p>
47
+ ---
48
+ name: nested quotation marks 2
49
+ in: |-
50
+ '"I swear, captain," replied I.'
51
+ html: |-
52
+ <p>&#8216;&#8220;I swear, captain,&#8221; replied I.&#8217;</p>
53
+ ---
54
+ name: apostrophe glyphs
55
+ desc: Single quotation marks ' will be turned into apostrophe glyphs when used as such.
56
+ in: Greengrocers' apostrophe's.
57
+ html: <p>Greengrocers&#8217; apostrophe&#8217;s.</p>
58
+ ---
59
+ name: em-dash glyphs
60
+ desc: Double -- dashes become an em-dash glyph.
61
+ in: You know the Italian proverb -- Chi ha compagno ha padrone.
62
+ html: <p>You know the Italian proverb &#8212; Chi ha compagno ha padrone.</p>
63
+ ---
64
+ name: em-dash glyphs 2
65
+ in: You know the Italian proverb--Chi ha compagno ha padrone.
66
+ html: <p>You know the Italian proverb&#8212;Chi ha compagno ha padrone.</p>
67
+ ---
68
+ name: en-dash glyphs
69
+ desc: Single - dashes are replaced with en-dashes.
70
+ in: You know the Italian proverb - Chi ha compagno ha padrone.
71
+ html: <p>You know the Italian proverb &#8211; Chi ha compagno ha padrone.</p>
72
+ ---
73
+ name: ellipsis character
74
+ desc: Three period marks become an ellipsis character.
75
+ in: Meanwhile...
76
+ html: <p>Meanwhile&#8230;</p>
77
+ ---
78
+ name: dimension character
79
+ desc: An “x” is replaced with the dimension character when used between numbers.
80
+ in: 1 x 2 x 3 = 6
81
+ html: <p>1 &#215; 2 &#215; 3 = 6</p>
82
+ ---
83
+ name: dimension character 2
84
+ in: 1x2x3 = 6
85
+ html: <p>1&#215;2&#215;3 = 6</p>
86
+ ---
87
+ name: trademark register copyright
88
+ desc: Trademark, Registered and Copyright symbols are represented by their common plain text equivalents.
89
+ in: Registered(r) Trademark(tm) Copyright (c).
90
+ html: <p>Registered&#174; Trademark&#8482; Copyright &#169;.</p>
91
+ ---
92
+ name: acronyms
93
+ desc: Acronyms consist of three or more uppercase characters, followed immediately by words in parentheses.
94
+ in: ABC(Always Be Closing)
95
+ html: <p><acronym title="Always Be Closing"><span class="caps">ABC</span></acronym></p>
96
+ no_span_caps_html: <p><acronym title="Always Be Closing">ABC</acronym></p>
97
+ latex: "Always Be Closing (ABC)\n\n"
98
+ ---
99
+ name: uppercase
100
+ desc: Uppercase words of three or more characters are enclosed with a special span element.
101
+ in: IBM or HAL
102
+ html: <p><span class="caps">IBM</span> or <span class="caps">HAL</span></p>
103
+ no_span_caps_html: <p>IBM or HAL</p>
104
+ latex: "IBM or HAL\n\n"
105
+ ---
106
+ name: emphasis
107
+ desc: Emphasis is added with _ underscores.
108
+ in: The _underlying_ cause.
109
+ html: <p>The <em>underlying</em> cause.</p>
110
+ ---
111
+ name: strong text
112
+ desc: Strong text is indicated by * asterisks.
113
+ in: The *underlying* cause.
114
+ html: <p>The <strong>underlying</strong> cause.</p>
115
+ ---
116
+ name: italic text
117
+ desc: em is a semantic tag, usually represented by browsers as italic text. To produce italic tags instead, use double underscores.
118
+ in: The __underlying__ cause.
119
+ html: <p>The <i>underlying</i> cause.</p>
120
+ ---
121
+ name: bold text
122
+ desc: strong is a semantic tag, usually represented by browsers as bold text. To produce bold tags instead, use double asterisks.
123
+ in: The **underlying** cause.
124
+ html: <p>The <b>underlying</b> cause.</p>
125
+ ---
126
+ name: citation
127
+ desc: Double question marks represent a citation, like the title of a book.
128
+ in: ??The Count of Monte Cristo??, by Dumas.
129
+ html: <p><cite>The Count of Monte Cristo</cite>, by Dumas.</p>
130
+ ---
131
+ name: inserted and deleted text
132
+ desc: Inserted and deleted text is represented by + plus and - minus symbols.
133
+ in: Scratch -that-, replace with +this+.
134
+ html: <p>Scratch <del>that</del>, replace with <ins>this</ins>.</p>
135
+ ---
136
+ name: subscript
137
+ desc: Subscript text is indicated by ~ tilde characters.
138
+ in: log ~2~ n
139
+ html: <p>log <sub>2</sub> n</p>
140
+ ---
141
+ name: superscript
142
+ desc: Superscript text is indicated by ^ caret characters.
143
+ in: 2 ^x^
144
+ html: <p>2 <sup>x</sup></p>
145
+ ---
146
+ name: span tag
147
+ desc: Percentage marks will enclose text with a XHTML span tag.
148
+ in: The %underlying% cause.
149
+ html: <p>The <span>underlying</span> cause.</p>
150
+ ---
151
+ name: code
152
+ desc: To include a short snippet of code such as XHTML or Javascript, surround it with @ “at” symbols. XHTML significant characters within a code phrase will be escaped for display to the reader.
153
+ in: About the @<hr />@ tag.
154
+ html: <p>About the <code>&lt;hr /&gt;</code> tag.</p>
155
+ ---
156
+ name: links
157
+ desc: Links are represented by double quotes and a colon.
158
+ in: '"link text":http://example.com/'
159
+ html: <p><a href="http://example.com/">link text</a></p>
160
+ ---
161
+ name: local links
162
+ desc: The host name may be ommitted for local links.
163
+ in: '"link text":/example'
164
+ html: <p><a href="/example">link text</a></p>
165
+ ---
166
+ name: link title
167
+ desc: A title may be placed in () parentheses.
168
+ in: '"link text(with title)":http://example.com/'
169
+ html: <p><a href="http://example.com/" title="with title">link text</a></p>
170
+ ---
171
+ name: link alias
172
+ desc: For frequent linking to a single URL, you can specify a link alias with [] square brackets.
173
+ in: |-
174
+ Here's "a link":tstate, and
175
+ "another link":tstate to the same site.
176
+
177
+ [tstate]http://thresholdstate.com/
178
+ html: |-
179
+ <p>Here&#8217;s <a href="http://thresholdstate.com/">a link</a>, and<br />
180
+ <a href="http://thresholdstate.com/">another link</a> to the same site.</p>
181
+ ---
182
+ name: image
183
+ desc: Use ! exclamation marks to insert an image tag.
184
+ in: "!/img.gif!"
185
+ html: <p><img src="/img.gif" alt="" /></p>
186
+ ---
187
+ name: image 2
188
+ in: "!http://thresholdstate.com/img.gif!"
189
+ html: <p><img src="http://thresholdstate.com/img.gif" alt="" /></p>
190
+ ---
191
+ name: image alt
192
+ desc: Use () parentheses to include “alt” text.
193
+ in: "!/img.gif(alt text)!"
194
+ html: <p><img src="/img.gif" title="alt text" alt="alt text" /></p>
195
+ ---
196
+ name: image links
197
+ desc: Images may be combined with links by using an !image! in place of the link text.
198
+ in: "!/img.gif!:http://textpattern.com/"
199
+ html: <p><a href="http://textpattern.com/"><img src="/img.gif" alt="" /></a></p>
200
+ ---
201
+ name: headers
202
+ desc: Headers are represented by h1., h2., … h6..
203
+ in: h1. Heading 1
204
+ html: <h1>Heading 1</h1>
205
+ ---
206
+ name: headers 2
207
+ in: h2. Heading 2
208
+ html: <h2>Heading 2</h2>
209
+ ---
210
+ name: headers 3
211
+ in: h6. Heading 6
212
+ html: <h6>Heading 6</h6>
213
+ ---
214
+ name: paragraph text
215
+ desc: "Paragraph p text is represented by p.. This is the default block type: any paragraph without a block modifier will automatically be enclosed with p tags."
216
+ in: |-
217
+ p. A paragraph.
218
+ Continued.
219
+
220
+ Also a paragraph.
221
+ html: |-
222
+ <p>A paragraph.<br />
223
+ Continued.</p>
224
+ <p>Also a paragraph.</p>
225
+ ---
226
+ name: block quote
227
+ desc: bq. indicates a quoted block of text.
228
+ in: |-
229
+ bq. A quotation.
230
+ Continued.
231
+
232
+ Regular paragraph.
233
+ html: |-
234
+ <blockquote>
235
+ <p>A quotation.<br />
236
+ Continued.</p>
237
+ </blockquote>
238
+ <p>Regular paragraph.</p>
239
+ ---
240
+ name: block quote citation
241
+ desc: Block quotes may include a citation URL immediately following the period.
242
+ in: bq.:http://thresholdstate.com/ A cited quotation.
243
+ html: |-
244
+ <blockquote cite="http://thresholdstate.com/">
245
+ <p>A cited quotation.</p>
246
+ </blockquote>
247
+ ---
248
+ name: footnotes
249
+ desc: Footnotes are represented by the fn1., fn2., … block modifiers.
250
+ in: |-
251
+ A footnote reference[1].
252
+
253
+ fn1. The footnote.
254
+ html: |-
255
+ <p>A footnote reference<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup>.</p>
256
+ <p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> The footnote.</p>
257
+ # html: |-
258
+ # <p>A footnote reference<sup class="footnote"><a href="#fn1216642796463b1223ae29d">1</a></sup>.</p>
259
+ # <p class="footnote" id="fn1216642796463b1223ae29d"><sup>1</sup> The footnote.</p>
260
+ ---
261
+ name: block code
262
+ desc: Code such as XHTML, Javascript or PHP may be displayed using the bc. “block code” modifier. XHTML significant characters such as < and > will be escaped within code blocks – bc is used for displaying code to the reader, not for executing it.
263
+ note: Note that Textile will interpret any blank lines within the code as indicating the end of the code block. See Extended Blocks below for an explanation of how to display longer blocks of code.
264
+ in: |-
265
+ bc. <script>
266
+ // a Javascript example
267
+ alert("Hello World");
268
+ </script>
269
+ html: |-
270
+ <pre><code>&lt;script&gt;
271
+ // a Javascript example
272
+ alert("Hello World");
273
+ &lt;/script&gt;</code></pre>
274
+ ---
275
+ name: preformatted text
276
+ desc: Use the pre. block modifier for pre-formatted text. XHTML significant characters within the block will be escaped.
277
+ note: pre. is almost identical to bc., with the exception that <code>...</code> tags are not used within the <pre> block.
278
+ in: |-
279
+ pre. Pre-formatted
280
+ text
281
+ html: |-
282
+ <pre>Pre-formatted
283
+ text</pre>
284
+ latex: |-
285
+ \begin{verbatim}Pre-formatted
286
+ text\end{verbatim}
287
+ ---
288
+ name: notextile
289
+ desc: The notextile. block modifier applies no Textile processing at all to a block. Raw XHTML characters are passed through untouched, so this may be used to insert explicit XHTML markup, or execute Javascript or PHP code.
290
+ in: |-
291
+ notextile. <script type="text/javascript">
292
+ document.write("Hello World!");
293
+ </script>
294
+ <noscript>Your browser doesn't support Javascript</noscript>
295
+ html: |-
296
+ <script type="text/javascript">
297
+ document.write("Hello World!");
298
+ </script>
299
+ <noscript>Your browser doesn't support Javascript</noscript>
300
+ valid_html: false
301
+ ---
302
+ name: class attribute
303
+ desc: CSS classes are specified with () parentheses.
304
+ in: p(myclass). My classy paragraph.
305
+ html: <p class="myclass">My classy paragraph.</p>
306
+ ---
307
+ name: id attribute
308
+ desc: CSS IDs are specified with () parentheses.
309
+ in: p(#myid). My ID paragraph.
310
+ html: <p id="myid">My ID paragraph.</p>
311
+ ---
312
+ name: style attribute
313
+ desc: CSS styles are specified with {} braces.
314
+ in: p{color:red}. Red rum.
315
+ html: <p style="color:red;">Red rum.</p>
316
+ ---
317
+ name: lang attribute
318
+ desc: Languages are specified with [] brackets.
319
+ in: p[fr-fr]. En français.
320
+ html: <p lang="fr-fr">En français.</p>
321
+ ---
322
+ name: phrase modifiers
323
+ desc: The same syntax may be applied to phrase modifiers.
324
+ in: A *(myclass)classy* phrase.
325
+ html: <p>A <strong class="myclass">classy</strong> phrase.</p>
326
+ ---
327
+ name: phrase modifiers 2
328
+ in: An _(#myid2)ID_ phrase.
329
+ html: <p>An <em id="myid2">ID</em> phrase.</p>
330
+ ---
331
+ name: phrase modifiers 3
332
+ in: The %{color:blue}blue% room.
333
+ html: <p>The <span style="color:blue;">blue</span> room.</p>
334
+ ---
335
+ name: block and phrase attributes combined
336
+ desc: Block and phrase attributes may be combined.
337
+ in: p(myclass#myid3){color:green}[de-de]. A complex paragraph.
338
+ html: <p style="color:green;" class="myclass" lang="de-de" id="myid3">A complex paragraph.</p>
339
+ ---
340
+ name: block and phrase attributes combined 2
341
+ in: A ??(myclass#myid4){color:green}[de-de]complex?? phrase.
342
+ html: <p>A <cite style="color:green;" class="myclass" lang="de-de" id="myid4">complex</cite> phrase.</p>
343
+ ---
344
+ name: extended blocks
345
+ desc: Normally a block modifier covers a single block of text, and ends at the first blank line. To extend a block over multiple paragraphs that include blank lines, use a block modifier with two period marks instead of one. To close the extended block, use a different block modifier on the next paragraph.
346
+ in: |-
347
+ bq.. A quote.
348
+
349
+ The quote continued.
350
+
351
+ p. Back to paragraph text.
352
+ html: |-
353
+ <blockquote>
354
+ <p>A quote.</p>
355
+ <p>The quote continued.</p>
356
+ </blockquote>
357
+ <p>Back to paragraph text.</p>
358
+ ---
359
+ name: extended block code
360
+ desc: Extended blocks are useful for displaying longer examples of code that contain blank lines.
361
+ in: |-
362
+ A PHP code example.
363
+
364
+ bc.. <?php
365
+ function hello() {
366
+ // display a hello message
367
+
368
+ print "Hello, World";
369
+ }
370
+ ?>
371
+
372
+ p. Following paragraph.
373
+ html: |-
374
+ <p>A <span class="caps">PHP</span> code example.</p>
375
+ <pre><code>&lt;?php
376
+ function hello() {
377
+ // display a hello message</code>
378
+
379
+ <code>print "Hello, World";
380
+ }
381
+ ?&gt;</code></pre>
382
+ <p>Following paragraph.</p>
383
+ ---
384
+ name: extended block attributes
385
+ desc: Any block attributes on an extended block will be included on each following block.
386
+ in: |-
387
+ p(myclass).. A classy paragraph.
388
+
389
+ Another classy paragraph.
390
+
391
+ p. Not so classy.
392
+ html: |-
393
+ <p class="myclass">A classy paragraph.</p>
394
+ <p class="myclass">Another classy paragraph.</p>
395
+ <p>Not so classy.</p>
396
+ ---
397
+ name: extended block quote attributes
398
+ desc: Attributes on bq.. extended blocks will be included on both the inner and outer blocks.
399
+ in: |-
400
+ bq(myclass).. Quote paragraph 1.
401
+
402
+ Paragraph 2.
403
+ html: |-
404
+ <blockquote class="myclass">
405
+ <p class="myclass">Quote paragraph 1.</p>
406
+ <p class="myclass">Paragraph 2.</p>
407
+ </blockquote>
408
+ ---
409
+ name: extended block code attributes
410
+ desc: Attributes on bc.. extended blocks will be included on both the inner and outer blocks.
411
+ in: |-
412
+ bc(myclass).. Code block 1.
413
+
414
+ Code block 2.
415
+ html: |-
416
+ <pre class="myclass"><code class="myclass">Code block 1.</code>
417
+
418
+ <code class="myclass">Code block 2.</code></pre>
419
+ ---
420
+ name: raw xhtml left in tact
421
+ desc: Raw XHTML tags are generally left untouched by Textile. Span tags that enclose only part of a block of text will be left intact, while the block itself is treated normally.
422
+ in: <b>bold</b> and <i>italic</i>, the hard way.
423
+ html: <p><b>bold</b> and <i>italic</i>, the hard way.</p>
424
+ ---
425
+ name: paragraphs entirely raw xhtml
426
+ desc: Paragraphs that consist entirely of raw XHTML block tags will not be enclosed in <p>...</p> tags.
427
+ in: <div class="mydiv">My div</div>
428
+ html: <div class="mydiv">My div</div>
429
+ ---
430
+ name: paragraphs with inline xhtml
431
+ desc: Paragraphs that consist only of inline XHTML tags, will be enclosed in <p>...</p> tags.
432
+ in: <img src="/img.gif" alt="image" />
433
+ html: <p><img src="/img.gif" alt="image" /></p>
434
+ ---
435
+ name: paragraphs with inline xhtml 2
436
+ in: <span class="myspan">I'll make my own way.</span>
437
+ html: '<p><span class="myspan">I&#8217;ll make my own way.</span></p>'
438
+ ---
439
+ name: paragraphs partly enclosed in xhtml block tags
440
+ desc: Paragraphs that are only partly enclosed in block tags will be enclosed in <p>...</p> tags.
441
+ in: <div>inside</div> and outside.
442
+ html: <div>inside</div> <p>and outside.</p>
443
+ # html: <p><div>inside</div> and outside.</p>
444
+ ---
445
+ name: complex xhtml blocks
446
+ desc: Textile can’t always identify the beginning and end of long or complex blocks of XHTML. To prevent Textile from enclosing complex XHTML blocks in paragraph tags, either use a space at the beginning of each line...
447
+ in: " <div>\n <span>My div</span>\n </div>"
448
+ html: "<div>\n<span>My div</span>\n</div>"
449
+ ---
450
+ name: complex xhtml blocks 2
451
+ desc: ...or a notexile.. extended block.
452
+ in: |-
453
+ notextile.. <div>
454
+
455
+ <span>My div</span>
456
+
457
+ </div>
458
+ html: |-
459
+ <div>
460
+
461
+ <span>My div</span>
462
+
463
+ </div>
464
+ ---
465
+ name: complex xhtml blocks with inline formatting
466
+ desc: Textile will not wrap lines that start with a space in paragraph tags, but it should parse inline signatures
467
+ in: " <div>\n <span>My *div*</span>\n </div>"
468
+ html: "<div>\n<span>My <strong>div</strong></span>\n</div>"
469
+ ---
470
+ name: explicit pre escapement
471
+ desc: The contents of explicit <pre>...</pre> tags are escaped for display.
472
+ in: |-
473
+ <pre>
474
+ A HTML <b>example</b>
475
+ </pre>
476
+ html: |-
477
+ <pre>
478
+ A HTML &lt;b&gt;example&lt;/b&gt;
479
+ </pre>
480
+ note: This syntax is supported for backwards compatibility only, and doesn’t always work as expected. The block modifier pre. should be used instead.
481
+ ---
482
+ name: explicit code escapement
483
+ desc: The contents of explicit <code>...</code> tags are escaped for display.
484
+ in: |-
485
+ <code>
486
+ Another HTML <b>example</b>
487
+ </code>
488
+ html: |-
489
+ <p><code>
490
+ Another HTML &lt;b&gt;example&lt;/b&gt;
491
+ </code></p>
492
+ note: This syntax is supported for backwards compatibility only, and doesn’t always work as expected. The block modifier bc. should be used instead.
493
+ ---
494
+ name: notextile tags
495
+ desc: Blocks enclosed by the pseudo tag <notextile>...</notextile> will be left untouched.
496
+ in: |-
497
+ <notextile>
498
+ p. Leave me alone
499
+ </notextile>
500
+ html: |-
501
+ p. Leave me alone
502
+ # html: |-
503
+ # <p>
504
+ # p. Leave me alone
505
+ # </p>
506
+ note: This syntax is supported for backwards compatibility only, and doesn’t always work as expected. The block modifier notextile. should be used instead.
507
+ valid_html: false
508
+ ---
509
+ name: left aligned text
510
+ desc: Left alignment is specified with a < less than symbol.
511
+ in: p<. Left-aligned paragraph.
512
+ html: <p style="text-align:left;">Left-aligned paragraph.</p>
513
+ ---
514
+ name: right aligned text
515
+ desc: Right alignment is specified with a > greater than symbol.
516
+ in: h3>. Right-aligned heading.
517
+ html: <h3 style="text-align:right;">Right-aligned heading.</h3>
518
+ ---
519
+ name: justified text
520
+ desc: Use both <> symbols for justified text.
521
+ in: p<>. Justified paragraph.
522
+ html: <p style="text-align:justify;">Justified paragraph.</p>
523
+ ---
524
+ name: centered text
525
+ desc: An = equals symbol represents centered text.
526
+ in: h3=. Centered heading.
527
+ html: <h3 style="text-align:center;">Centered heading.</h3>
528
+ ---
529
+ name: padding
530
+ desc: Use empty ( and ) parentheses to add padding to blocks, in multiples of 1 em.
531
+ in: p(. Left pad 1em.
532
+ html: <p style="padding-left:1em;">Left pad 1em.</p>
533
+ ---
534
+ name: padding 2
535
+ in: p)). Right pad 2em.
536
+ html: <p style="padding-right:2em;">Right pad 2em.</p>
537
+ ---
538
+ name: padding 3
539
+ in: p(). Left and right pad 1em.
540
+ html: <p style="padding-left:1em;padding-right:1em;">Left and right pad 1em.</p>
541
+ ---
542
+ name: numeric lists
543
+ desc: Numeric lists are represented by lines beginning with #.
544
+ in: |-
545
+ # Item one
546
+ # Item two
547
+ # Item three
548
+ html: |-
549
+ <ol>
550
+ <li>Item one</li>
551
+ <li>Item two</li>
552
+ <li>Item three</li>
553
+ </ol>
554
+ ---
555
+ name: bulleted lists
556
+ desc: Bulleted lists are represented by lines beginning with *.
557
+ in: |-
558
+ * Item A
559
+ * Item B
560
+ * Item C
561
+ html: |-
562
+ <ul>
563
+ <li>Item A</li>
564
+ <li>Item B</li>
565
+ <li>Item C</li>
566
+ </ul>
567
+ ---
568
+ name: nested lists
569
+ desc: Use multiple # or * symbols to create nested lists.
570
+ in: |-
571
+ # Item one
572
+ ## Item one-A
573
+ ## Item one-B
574
+ ### Item one-B-a
575
+ # Item two
576
+ html: |-
577
+ <ol>
578
+ <li>Item one
579
+ <ol>
580
+ <li>Item one-A</li>
581
+ <li>Item one-B
582
+ <ol>
583
+ <li>Item one-B-a</li>
584
+ </ol></li>
585
+ </ol></li>
586
+ <li>Item two</li>
587
+ </ol>
588
+ ---
589
+ name: tables
590
+ desc: Tables can be constructed using | “pipe” symbols to separate cells.
591
+ in: "|a|simple|table|"
592
+ html: |-
593
+ <table>
594
+ <tr>
595
+ <td>a</td>
596
+ <td>simple</td>
597
+ <td>table</td>
598
+ </tr>
599
+ </table>
600
+ ---
601
+ name: table heading cells
602
+ desc: Use _. to indicate table heading cells.
603
+ in: |-
604
+ |_. a|_. table|_. heading|
605
+ |a|table|row|
606
+ html: |-
607
+ <table>
608
+ <tr>
609
+ <th>a</th>
610
+ <th>table</th>
611
+ <th>heading</th>
612
+ </tr>
613
+ <tr>
614
+ <td>a</td>
615
+ <td>table</td>
616
+ <td>row</td>
617
+ </tr>
618
+ </table>
619
+ ---
620
+ name: cell attributes
621
+ desc: Attributes may be applied separately to individual cells, rows, and entire tables. Cell attributes are placed within each cell.
622
+ in: "|a|{color:red}. styled|cell|"
623
+ html: |-
624
+ <table>
625
+ <tr>
626
+ <td>a</td>
627
+ <td style="color:red;">styled</td>
628
+ <td>cell</td>
629
+ </tr>
630
+ </table>
631
+ ---
632
+ name: row attributes
633
+ desc: Row attributes are placed at the beginning of a row, followed by a dot and a space.
634
+ in: (rowclass). |a|classy|row|
635
+ html: |-
636
+ <table>
637
+ <tr class="rowclass">
638
+ <td>a</td>
639
+ <td>classy</td>
640
+ <td>row</td>
641
+ </tr>
642
+ </table>
643
+ ---
644
+ name: table attributes
645
+ desc: Table attributes are specified by placing the special table. block modifier immediately before the table.
646
+ in: |-
647
+ table(tableclass).
648
+ |a|classy|table|
649
+ |a|classy|table|
650
+ html: |-
651
+ <table class="tableclass">
652
+ <tr>
653
+ <td>a</td>
654
+ <td>classy</td>
655
+ <td>table</td>
656
+ </tr>
657
+ <tr>
658
+ <td>a</td>
659
+ <td>classy</td>
660
+ <td>table</td>
661
+ </tr>
662
+ </table>
663
+ ---
664
+ name: vertical alignment
665
+ desc: Special alignment symbols are available for vertical alignment within table cells.
666
+ in: "|^. top alignment|"
667
+ html: |-
668
+ <table>
669
+ <tr>
670
+ <td style="vertical-align:top;">top alignment</td>
671
+ </tr>
672
+ </table>
673
+ ---
674
+ name: vertical alignment 2
675
+ in: |-
676
+ |-. middle alignment|
677
+ html: |-
678
+ <table>
679
+ <tr>
680
+ <td style="vertical-align:middle;">middle alignment</td>
681
+ </tr>
682
+ </table>
683
+ ---
684
+ name: vertical alignment 3
685
+ in: |-
686
+ |~. bottom alignment|
687
+ html: |-
688
+ <table>
689
+ <tr>
690
+ <td style="vertical-align:bottom;">bottom alignment</td>
691
+ </tr>
692
+ </table>
693
+ ---
694
+ name: column span
695
+ desc: Use a \ backslash to indicate a column span.
696
+ in: |-
697
+ |\2. spans two cols |
698
+ | col 1 | col 2 |
699
+ html: |-
700
+ <table>
701
+ <tr>
702
+ <td colspan="2">spans two cols </td>
703
+ </tr>
704
+ <tr>
705
+ <td> col 1 </td>
706
+ <td> col 2 </td>
707
+ </tr>
708
+ </table>
709
+ ---
710
+ name: row span
711
+ desc: Use a / forward slash to indicate a row span.
712
+ in: |-
713
+ |/3. spans 3 rows | row a |
714
+ | row b |
715
+ | row c |
716
+ html: |-
717
+ <table>
718
+ <tr>
719
+ <td rowspan="3">spans 3 rows </td>
720
+ <td> row a </td>
721
+ </tr>
722
+ <tr>
723
+ <td> row b </td>
724
+ </tr>
725
+ <tr>
726
+ <td> row c </td>
727
+ </tr>
728
+ </table>
729
+ ---
730
+ name: whitespace required
731
+ desc: Links, images and phrase modifiers normally require surrounding whitespace.
732
+ in: this*won't*work
733
+ html: <p>this*won&#8217;t*work</p>
734
+ ---
735
+ name: modifier without whitespace
736
+ desc: To use these without whitespace, surround the modifier with [] square brackets.
737
+ in: this[*will*]work
738
+ html: <p>this<strong>will</strong>work</p>
739
+ ---
740
+ name: modifier without whitespace 2
741
+ desc: This is particularly useful in conjunction with superscript and subscript.
742
+ in: 1[^st^], 2[^nd^], 3[^rd^].
743
+ html: <p>1<sup>st</sup>, 2<sup>nd</sup>, 3<sup>rd</sup>.</p>
744
+ ---
745
+ name: modifier without whitespace 3
746
+ in: 2 log[~n~]
747
+ html: <p>2 log<sub>n</sub></p>
748
+ ---
749
+ name: modifier without whitespace 4
750
+ desc: It can also be used to include links and images without surrounding whitespace.
751
+ in: |-
752
+ A close[!/img.gif!]image.
753
+ A tight["text":http://thresholdstate.com/]link.
754
+ A ["footnoted link":http://thresholdstate.com/][1].
755
+ html: |-
756
+ <p>A close<img src="/img.gif" alt="" />image.<br />
757
+ A tight<a href="http://thresholdstate.com/">text</a>link.<br />
758
+ A <a href="http://thresholdstate.com/">footnoted link</a><sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup>.</p>
759
+ # html: |-
760
+ # <p>A close<img src="/img.gif" alt="" />image.<br />
761
+ # A tight<a href="http://thresholdstate.com/">text</a>link.<br />
762
+ # A <a href="http://thresholdstate.com/">footnoted link</a><sup class="footnote"><a href="#fn1216642796463b1223ae29d">1</a></sup>.</p>