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.

Files changed (62) hide show
  1. data/.gemtest +0 -0
  2. data/.gitignore +26 -0
  3. data/.rspec +1 -0
  4. data/CHANGELOG +235 -0
  5. data/COPYING +18 -0
  6. data/Gemfile +7 -0
  7. data/README +198 -0
  8. data/Rakefile +16 -0
  9. data/bin/redcloth +28 -0
  10. data/doc/textile_reference.html +631 -0
  11. data/lib/case_sensitive_require/RedCloth.rb +6 -0
  12. data/lib/redcloth.rb +44 -0
  13. data/lib/redcloth/erb_extension.rb +27 -0
  14. data/lib/redcloth/formatters/base.rb +63 -0
  15. data/lib/redcloth/formatters/html.rb +345 -0
  16. data/lib/redcloth/formatters/latex.rb +322 -0
  17. data/lib/redcloth/formatters/latex_entities.yml +2414 -0
  18. data/lib/redcloth/textile_doc.rb +103 -0
  19. data/lib/redcloth/version.rb +34 -0
  20. data/lib/tasks/pureruby.rake +17 -0
  21. data/redcloth.gemspec +47 -0
  22. data/spec/benchmark_spec.rb +15 -0
  23. data/spec/custom_tags_spec.rb +50 -0
  24. data/spec/erb_spec.rb +10 -0
  25. data/spec/extension_spec.rb +26 -0
  26. data/spec/fixtures/basic.yml +1028 -0
  27. data/spec/fixtures/code.yml +257 -0
  28. data/spec/fixtures/definitions.yml +82 -0
  29. data/spec/fixtures/extra_whitespace.yml +64 -0
  30. data/spec/fixtures/filter_html.yml +177 -0
  31. data/spec/fixtures/filter_pba.yml +20 -0
  32. data/spec/fixtures/html.yml +348 -0
  33. data/spec/fixtures/images.yml +279 -0
  34. data/spec/fixtures/instiki.yml +38 -0
  35. data/spec/fixtures/links.yml +291 -0
  36. data/spec/fixtures/lists.yml +462 -0
  37. data/spec/fixtures/poignant.yml +89 -0
  38. data/spec/fixtures/sanitize_html.yml +42 -0
  39. data/spec/fixtures/table.yml +434 -0
  40. data/spec/fixtures/textism.yml +509 -0
  41. data/spec/fixtures/threshold.yml +762 -0
  42. data/spec/formatters/class_filtered_html_spec.rb +7 -0
  43. data/spec/formatters/filtered_html_spec.rb +7 -0
  44. data/spec/formatters/html_no_breaks_spec.rb +9 -0
  45. data/spec/formatters/html_spec.rb +13 -0
  46. data/spec/formatters/id_filtered_html_spec.rb +7 -0
  47. data/spec/formatters/latex_spec.rb +13 -0
  48. data/spec/formatters/lite_mode_html_spec.rb +7 -0
  49. data/spec/formatters/no_span_caps_html_spec.rb +7 -0
  50. data/spec/formatters/sanitized_html_spec.rb +7 -0
  51. data/spec/formatters/style_filtered_html_spec.rb +7 -0
  52. data/spec/parser_spec.rb +102 -0
  53. data/spec/spec_helper.rb +36 -0
  54. data/tasks/compile.rake +47 -0
  55. data/tasks/gems.rake +37 -0
  56. data/tasks/ragel_extension_task.rb +127 -0
  57. data/tasks/release.rake +15 -0
  58. data/tasks/rspec.rake +13 -0
  59. data/tasks/rvm.rake +78 -0
  60. data/test/ragel_profiler.rb +73 -0
  61. data/test/validate_fixtures.rb +74 -0
  62. metadata +166 -0
@@ -0,0 +1,38 @@
1
+ --- # Bugs filed at http://www.instiki.org/show/BugReports
2
+ in: |-
3
+ _Hi, <span class="newWikiWord">Joe Bob<a href="../show/JoeBob">?</a></span>, this should all be in italic!_
4
+ html: |-
5
+ <p><em>Hi, <span class="newWikiWord">Joe Bob<a href="../show/JoeBob">?</a></span>, this should all be in italic!</em></p>
6
+ ---
7
+ in: '*this <span>span</span> is strong*'
8
+ html: '<p><strong>this <span>span</span> is strong</strong></p>'
9
+ ---
10
+ in: '*this <span>Camel Thing<a href="../show/CamelThing">?</a></span> is strong*'
11
+ html: '<p><strong>this <span>Camel Thing<a href="../show/CamelThing">?</a></span> is strong</strong></p>'
12
+ ---
13
+ in: '_this <span>span</span> is italic_'
14
+ html: '<p><em>this <span>span</span> is italic</em></p>'
15
+ ---
16
+ in: '%{color:red}nested span because of <span><span class="newWikiWord">Camel Word<a href="../show/CamelWord">?</a></span></span>%'
17
+ html: '<p><span style="color:red;">nested span because of <span><span class="newWikiWord">Camel Word<a href="../show/CamelWord">?</a></span></span></span></p>'
18
+ ---
19
+ in: |-
20
+ h2. Version History
21
+
22
+ * "Version
23
+ 0.0":http://www.threewordslong.com/render-0-8-9b.patch - Early version using MD5 hashes.
24
+ * "Version
25
+ 0.1":http://www.threewordslong.com/chunk-0-1.patch.gz - First cut of new system. Much cleaner.
26
+ * "Version 0.2":http://www.threewordslong.com/chunk-0-2.patch.gz - Fixed problem with "authors" page and some tests.
27
+ html: |-
28
+ <h2>Version History</h2>
29
+ <ul>
30
+ <li><a href="http://www.threewordslong.com/render-0-8-9b.patch">Version<br />
31
+ 0.0</a> &#8211; Early version using MD5 hashes.</li>
32
+ <li><a href="http://www.threewordslong.com/chunk-0-1.patch.gz">Version<br />
33
+ 0.1</a> &#8211; First cut of new system. Much cleaner.</li>
34
+ <li><a href="http://www.threewordslong.com/chunk-0-2.patch.gz">Version 0.2</a> &#8211; Fixed problem with &#8220;authors&#8221; page and some tests.</li>
35
+ </ul>
36
+ ---
37
+ in: "--richSeymour --whyTheLuckyStiff"
38
+ html: "<p>&#8212;richSeymour &#8212;whyTheLuckyStiff</p>"
@@ -0,0 +1,291 @@
1
+ ---
2
+ in: '"link text":#1'
3
+ html: <p><a href="#1">link text</a></p>
4
+ ---
5
+ in: '"link text":#a'
6
+ html: <p><a href="#a">link text</a></p>
7
+ ---
8
+ in: '"link text":#a1'
9
+ html: <p><a href="#a1">link text</a></p>
10
+ ---
11
+ in: '"link text":#a10'
12
+ html: <p><a href="#a10">link text</a></p>
13
+ ---
14
+ in: '"link text":index.html'
15
+ html: <p><a href="index.html">link text</a></p>
16
+ ---
17
+ in: '"link text":index.html#1'
18
+ html: <p><a href="index.html#1">link text</a></p>
19
+ ---
20
+ in: '"link text":index.html#a'
21
+ html: <p><a href="index.html#a">link text</a></p>
22
+ ---
23
+ in: '"link text":index.html#a1'
24
+ html: <p><a href="index.html#a1">link text</a></p>
25
+ ---
26
+ in: '"link text":index.html#a10'
27
+ html: <p><a href="index.html#a10">link text</a></p>
28
+ ---
29
+ in: '"link text":http://example.com/'
30
+ html: <p><a href="http://example.com/">link text</a></p>
31
+ ---
32
+ in: '"link text":http://example.com/#1'
33
+ html: <p><a href="http://example.com/#1">link text</a></p>
34
+ ---
35
+ in: '"link text":http://example.com/#a'
36
+ html: <p><a href="http://example.com/#a">link text</a></p>
37
+ ---
38
+ in: '"link text":http://example.com/#a1'
39
+ html: <p><a href="http://example.com/#a1">link text</a></p>
40
+ ---
41
+ in: '"link text":http://example.com/#a10'
42
+ html: <p><a href="http://example.com/#a10">link text</a></p>
43
+ ---
44
+ in: '"link text":http://example.com/index.html'
45
+ html: <p><a href="http://example.com/index.html">link text</a></p>
46
+ ---
47
+ in: '"link text":http://example.com/index.html#a'
48
+ html: <p><a href="http://example.com/index.html#a">link text</a></p>
49
+ ---
50
+ in: '"link text":http://example.com/index.html#1'
51
+ html: <p><a href="http://example.com/index.html#1">link text</a></p>
52
+ ---
53
+ in: '"link text":http://example.com/index.html#a1'
54
+ html: <p><a href="http://example.com/index.html#a1">link text</a></p>
55
+ ---
56
+ in: '"link text":http://example.com/index.html#a10'
57
+ html: <p><a href="http://example.com/index.html#a10">link text</a></p>
58
+ ---
59
+ in: '"link text":http://example.com/?foo=bar'
60
+ html: <p><a href="http://example.com/?foo=bar">link text</a></p>
61
+ ---
62
+ in: '"link text":http://example.com/?foo=bar#a'
63
+ html: <p><a href="http://example.com/?foo=bar#a">link text</a></p>
64
+ ---
65
+ in: '"link & text":http://example.com/?foo=bar#a'
66
+ html: <p><a href="http://example.com/?foo=bar#a">link &amp; text</a></p>
67
+ ---
68
+ in: '"link text":http://example.com/?foo=bar#1'
69
+ html: <p><a href="http://example.com/?foo=bar#1">link text</a></p>
70
+ ---
71
+ in: '"link text":http://example.com/?foo=bar#a1'
72
+ html: <p><a href="http://example.com/?foo=bar#a1">link text</a></p>
73
+ ---
74
+ in: '"link text":http://example.com/?foo=bar#a10'
75
+ html: <p><a href="http://example.com/?foo=bar#a10">link text</a></p>
76
+ ---
77
+ in: '"link text":http://example.com/?foo=bar&a=b'
78
+ html: <p><a href="http://example.com/?foo=bar&amp;a=b">link text</a></p>
79
+ ---
80
+ in: '"link text":http://example.com/?foo=bar&a=b#1'
81
+ html: <p><a href="http://example.com/?foo=bar&amp;a=b#1">link text</a></p>
82
+ ---
83
+ in: '"link text":http://example.com/?foo=bar&a=b#a'
84
+ html: <p><a href="http://example.com/?foo=bar&amp;a=b#a">link text</a></p>
85
+ ---
86
+ in: '"link text":http://example.com/?foo=bar&a=b#a1'
87
+ html: <p><a href="http://example.com/?foo=bar&amp;a=b#a1">link text</a></p>
88
+ ---
89
+ in: '"link text":http://example.com/?foo=bar&a=b#a10'
90
+ html: <p><a href="http://example.com/?foo=bar&amp;a=b#a10">link text</a></p>
91
+ ---
92
+ in: 'This is a "link":http://example.com/'
93
+ html: <p>This is a <a href="http://example.com/">link</a></p>
94
+ ---
95
+ in: 'This is a "link":http://example.com/.'
96
+ html: <p>This is a <a href="http://example.com/">link</a>.</p>
97
+ ---
98
+ in: 'This is a "link":http://example.com/index.html.'
99
+ html: <p>This is a <a href="http://example.com/index.html">link</a>.</p>
100
+ ---
101
+ in: 'This is a "link":http://example.com/index.html#a.'
102
+ html: <p>This is a <a href="http://example.com/index.html#a">link</a>.</p>
103
+ ---
104
+ in: 'This is a "link":http://example.com/index.html#1.'
105
+ html: <p>This is a <a href="http://example.com/index.html#1">link</a>.</p>
106
+ ---
107
+ in: 'This is a "link":http://example.com/index.html#a1.'
108
+ html: <p>This is a <a href="http://example.com/index.html#a1">link</a>.</p>
109
+ ---
110
+ in: 'This is a "link":http://example.com/index.html#a10.'
111
+ html: <p>This is a <a href="http://example.com/index.html#a10">link</a>.</p>
112
+ ---
113
+ in: 'This is a "link":http://example.com/?foo=bar.'
114
+ html: <p>This is a <a href="http://example.com/?foo=bar">link</a>.</p>
115
+ ---
116
+ in: 'This is a "link":http://example.com/?foo=bar#1.'
117
+ html: <p>This is a <a href="http://example.com/?foo=bar#1">link</a>.</p>
118
+ ---
119
+ in: 'This is a "link":http://example.com/?foo=bar#a.'
120
+ html: <p>This is a <a href="http://example.com/?foo=bar#a">link</a>.</p>
121
+ ---
122
+ in: 'This is a "link":http://example.com/?foo=bar#a1.'
123
+ html: <p>This is a <a href="http://example.com/?foo=bar#a1">link</a>.</p>
124
+ ---
125
+ in: 'This is a "link":http://example.com/?foo=bar#a10.'
126
+ html: <p>This is a <a href="http://example.com/?foo=bar#a10">link</a>.</p>
127
+ ---
128
+ in: 'This is a "link":http://example.com/?foo=bar#a10, but this is not.'
129
+ html: <p>This is a <a href="http://example.com/?foo=bar#a10">link</a>, but this is not.</p>
130
+ ---
131
+ in: '(This is a "link":http://example.com/?foo=bar#a10) but this is not.'
132
+ html: <p>(This is a <a href="http://example.com/?foo=bar#a10">link</a>) but this is not.</p>
133
+ ---
134
+ in: '"link text(link title)":http://example.com/'
135
+ html: <p><a href="http://example.com/" title="link title">link text</a></p>
136
+ # ---
137
+ # in: '"link text(link title) ":http://example.com/'
138
+ # html: <p>&#8220;link text(link title) &#8220;:http://example.com/</p>
139
+ # comments: this is a real test and should pass
140
+ ---
141
+ name: link with title attribute
142
+ in: '"(link) text(link title)":http://example.com/'
143
+ html: <p><a href="http://example.com/" class="link" title="link title">text</a></p>
144
+ comments: link text can not contain parentheses
145
+ ---
146
+ name: link with space between link text and title attribute
147
+ in: '"text (link title)":http://example.com/'
148
+ html: <p><a href="http://example.com/" title="link title">text</a></p>
149
+ ---
150
+ in: '"Dive Into XML":http://www.xml.com/pub/au/164'
151
+ html: <p><a href="http://www.xml.com/pub/au/164">Dive Into <span class="caps">XML</span></a></p>
152
+ ---
153
+ in: '"Lab Exercises":../lab/exercises/exercises.html.'
154
+ html: <p><a href="../lab/exercises/exercises.html">Lab Exercises</a>.</p>
155
+ ---
156
+ in: 'Go to "discuss":http://www.dreammoods.com/cgibin/cutecast/cutecast.pl?forum=1&thread=26627 to discuss.'
157
+ html: <p>Go to <a href="http://www.dreammoods.com/cgibin/cutecast/cutecast.pl?forum=1&amp;thread=26627">discuss</a> to discuss.</p>
158
+ ---
159
+ in: '* "rubylang":http://www.ruby-lang.org/en/'
160
+ html: "<ul>\n\t<li><a href=\"http://www.ruby-lang.org/en/\">rubylang</a></li>\n</ul>"
161
+ ---
162
+ in: 'The ION coding style document found at "IONCodingStyleGuide.doc":http://perforce:8081/@md=d&cd=//&c=82E@//depot/systest/system/main/pub/doc/IONCodingStyleGuide.doc?ac=22 codifies a couple of rules to ensure reasonably consistent code and documentation of libraries in ION. Test text'
163
+ html: <p>The <span class="caps">ION</span> coding style document found at <a href="http://perforce:8081/@md=d&amp;cd=//&amp;c=82E@//depot/systest/system/main/pub/doc/IONCodingStyleGuide.doc?ac=22">IONCodingStyleGuide.doc</a> codifies a couple of rules to ensure reasonably consistent code and documentation of libraries in <span class="caps">ION</span>. Test text</p>
164
+ ---
165
+ in: '"testing":'
166
+ html: "<p>&#8220;testing&#8221;:</p>"
167
+ ---
168
+ name: trailing space not absorbed by link
169
+ in: '"Link":/foo.html me'
170
+ html: "<p><a href=\"/foo.html\">Link</a> me</p>"
171
+ ---
172
+ name: trailing comma stays outside link
173
+ in: '"Link":/foo.html, me'
174
+ html: "<p><a href=\"/foo.html\">Link</a>, me</p>"
175
+ ---
176
+ name: trailing exclamation stays outside link
177
+ in: '"Link":/foo.html! me'
178
+ html: "<p><a href=\"/foo.html\">Link</a>! me</p>"
179
+ ---
180
+ name: trailing semicolon stays outside link
181
+ in: '"Link":/foo.html; me'
182
+ html: "<p><a href=\"/foo.html\">Link</a>; me</p>"
183
+ ---
184
+ name: trailing period stays outside link
185
+ in: '"Link":/foo.html.'
186
+ html: "<p><a href=\"/foo.html\">Link</a>.</p>"
187
+ ---
188
+ name: whose text is a parenthetical statement
189
+ in: '"(just in case you were wondering)":http://slashdot.org/'
190
+ html: '<p><a href="http://slashdot.org/">(just in case you were wondering)</a></p>'
191
+ ---
192
+ name: that has a class and whose text is a parenthetical statement
193
+ in: '"(myclass) (just in case you were wondering)":http://slashdot.org/'
194
+ html: '<p><a href="http://slashdot.org/" class="myclass">(just in case you were wondering)</a></p>'
195
+ ---
196
+ name: link containing parentheses
197
+ in: '"It is (very) fortunate that this works":http://slashdot.org/'
198
+ html: '<p><a href="http://slashdot.org/">It is (very) fortunate that this works</a></p>'
199
+ ---
200
+ name: link containing quotes
201
+ in: '"He said it is "very unlikely" this works":http://slashdot.org/'
202
+ html: '<p><a href="http://slashdot.org/">He said it is &#8220;very unlikely&#8221; this works</a></p>'
203
+ ---
204
+ name: link containing multiple quotes
205
+ in: '"He said it is "very unlikely" the "economic stimulus" works":http://slashdot.org/'
206
+ html: '<p><a href="http://slashdot.org/">He said it is &#8220;very unlikely&#8221; the &#8220;economic stimulus&#8221; works</a></p>'
207
+ ---
208
+ name: linked quoted phrase
209
+ in: '""Open the pod bay doors please, HAL."":http://www.youtube.com/watch?v=npN9l2Bd06s'
210
+ html: '<p><a href="http://www.youtube.com/watch?v=npN9l2Bd06s">&#8220;Open the pod bay doors please, <span class="caps">HAL</span>.&#8221;</a></p>'
211
+ ---
212
+ name: link following quoted phrase
213
+ in: '"quote" text "quote" text "link":http://google.com'
214
+ html: '<p>&#8220;quote&#8221; text &#8220;quote&#8221; text <a href="http://google.com">link</a></p>'
215
+ ---
216
+ name: links containing underscores
217
+ in: 'This is a link to a "Wikipedia article about Barack":http://en.wikipedia.org/wiki/Barack_Obama'
218
+ html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Barack_Obama">Wikipedia article about Barack</a></p>'
219
+ ---
220
+ name: links containing parentheses
221
+ in: 'This is a link to a ["Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language)]'
222
+ html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Wikipedia article about Textile</a></p>'
223
+ ---
224
+ name: links contained in parentheses
225
+ in: 'This is a regular link (but in parentheses: "Google":http://www.google.com)'
226
+ html: '<p>This is a regular link (but in parentheses: <a href="http://www.google.com">Google</a>)</p>'
227
+ ---
228
+ name: links containing parentheses without brackets
229
+ in: 'This is a link to a "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language)'
230
+ html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Wikipedia article about Textile</a></p>'
231
+ ---
232
+ name: links containing parentheses period at end without brackets
233
+ in: 'This is a link to a "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language).'
234
+ html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Wikipedia article about Textile</a>.</p>'
235
+ ---
236
+ name: broken links containing parentheses without brackets
237
+ in: 'This is a link to a "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language'
238
+ html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(markup_language">Wikipedia article about Textile</a></p>'
239
+ ---
240
+ name: links containing parentheses without brackets inside a parenthesis
241
+ in: 'Textile is awesome! (Check out the "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language))'
242
+ html: '<p>Textile is awesome! (Check out the <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Wikipedia article about Textile</a>)</p>'
243
+ ---
244
+ name: quotes and follow link
245
+ in: 'Some "text" followed by a "link":http://redcloth.org.'
246
+ html: '<p>Some &#8220;text&#8221; followed by a <a href="http://redcloth.org">link</a>.</p>'
247
+ lite_mode_html: 'Some &#8220;text&#8221; followed by a <a href="http://redcloth.org">link</a>.'
248
+ ---
249
+ name: link alias containing dashes
250
+ in: |-
251
+ "link":google-rocks
252
+
253
+ [google-rocks]http://google.com
254
+ html: |-
255
+ <p><a href="http://google.com">link</a></p>
256
+ ---
257
+ name: contained in multi-paragraph quotes
258
+ in: |-
259
+ "I first learned about "Redcloth":http://redcloth.org/ several years ago.
260
+
261
+ "It's wonderful."
262
+ html: |-
263
+ <p>&#8220;I first learned about <a href="http://redcloth.org/">Redcloth</a> several years ago.</p>
264
+ <p>&#8220;It&#8217;s wonderful.&#8221;</p>
265
+ ---
266
+ name: as html in notextile contained in multi-paragraph quotes
267
+ in: |-
268
+ "Here is a <notextile><a href="http://redcloth.org/">link</a></notextile>.
269
+
270
+ "I like links."
271
+ html: |-
272
+ <p>&#8220;Here is a <a href="http://redcloth.org/">link</a>.</p>
273
+ <p>&#8220;I like links.&#8221;</p>
274
+ ---
275
+ name: contained in para with multiple quotes
276
+ in: |-
277
+ "My wife, Tipper, and I will donate 100% of the proceeds of the award to the "Alliance For Climate Protection":http://www.looktothestars.org/charity/638-alliance-for-climate-protection," said Gore in an email. "I am deeply honored to receive the Nobel Peace Prize."
278
+ html: |-
279
+ <p>&#8220;My wife, Tipper, and I will donate 100% of the proceeds of the award to the <a href="http://www.looktothestars.org/charity/638-alliance-for-climate-protection">Alliance For Climate Protection</a>,&#8221; said Gore in an email. &#8220;I am deeply honored to receive the Nobel Peace Prize.&#8221;</p>
280
+ ---
281
+ name: with caps in the title
282
+ in: |-
283
+ "British Skin Foundation (BSF)":http://www.britishskinfoundation.org.uk
284
+ html: |-
285
+ <p><a href="http://www.britishskinfoundation.org.uk" title="BSF">British Skin Foundation</a></p>
286
+ ---
287
+ name: containing HTML tags with quotes
288
+ in: |-
289
+ "<r:attachment:image name="checkmark.gif" alt="Apply online" />*apply online*":/admissions/apply/
290
+ html: |-
291
+ <p><a href="/admissions/apply/"><r:attachment:image name="checkmark.gif" alt="Apply online" /><strong>apply online</strong></a></p>
@@ -0,0 +1,462 @@
1
+ ---
2
+ name: code in bullet list
3
+ in: "* command run: @time ruby run-tests.rb > toto@"
4
+ html: "<ul>\n\t<li>command run: <code>time ruby run-tests.rb &gt; toto</code></li>\n</ul>"
5
+ --- # Bret Pettichord, Thanks.
6
+ name: hard break in list
7
+ in: |-
8
+ * first line
9
+ * second
10
+ line
11
+ * third line
12
+ html: |-
13
+ <ul>
14
+ <li>first line</li>
15
+ <li>second<br />
16
+ line</li>
17
+ <li>third line</li>
18
+ </ul>
19
+ ---
20
+ name: mixed nesting
21
+ in: |-
22
+ * bullet
23
+ *# number
24
+ *# number
25
+ *#* bullet
26
+ *# number
27
+ *# number with
28
+ a break
29
+ * bullet
30
+ ** okay
31
+ html: |-
32
+ <ul>
33
+ <li>bullet
34
+ <ol>
35
+ <li>number</li>
36
+ <li>number
37
+ <ul>
38
+ <li>bullet</li>
39
+ </ul></li>
40
+ <li>number</li>
41
+ <li>number with<br />
42
+ a break</li>
43
+ </ol></li>
44
+ <li>bullet
45
+ <ul>
46
+ <li>okay</li>
47
+ </ul></li>
48
+ </ul>
49
+ ---
50
+ name: list continuation
51
+ in: |-
52
+ # one
53
+ # two
54
+ # three
55
+
56
+ # one
57
+ # two
58
+ # three
59
+
60
+ #_ four
61
+ # five
62
+ # six
63
+ html: |-
64
+ <ol>
65
+ <li>one</li>
66
+ <li>two</li>
67
+ <li>three</li>
68
+ </ol>
69
+ <ol>
70
+ <li>one</li>
71
+ <li>two</li>
72
+ <li>three</li>
73
+ </ol>
74
+ <ol start="4">
75
+ <li>four</li>
76
+ <li>five</li>
77
+ <li>six</li>
78
+ </ol>
79
+ valid_html: false
80
+ comment: there's not a good, valid alternative to the start attribute
81
+ ---
82
+ name: continue after break
83
+ in: |-
84
+ # one
85
+ # two
86
+ # three
87
+
88
+ test
89
+
90
+ #_ four
91
+ # five
92
+ # six
93
+
94
+ test
95
+
96
+ #_ seven
97
+ # eight
98
+ # nine
99
+ html: |-
100
+ <ol>
101
+ <li>one</li>
102
+ <li>two</li>
103
+ <li>three</li>
104
+ </ol>
105
+ <p>test</p>
106
+ <ol start="4">
107
+ <li>four</li>
108
+ <li>five</li>
109
+ <li>six</li>
110
+ </ol>
111
+ <p>test</p>
112
+ <ol start="7">
113
+ <li>seven</li>
114
+ <li>eight</li>
115
+ <li>nine</li>
116
+ </ol>
117
+ valid_html: false
118
+ comment: there's not a good, valid alternative to the start attribute
119
+ ---
120
+ name: continue list when prior list contained nested list
121
+ in: |-
122
+ # one
123
+ # two
124
+ # three
125
+
126
+ #_ four
127
+ # five
128
+ ## sub-note
129
+ ## another sub-note
130
+ # six
131
+
132
+ #_ seven
133
+ # eight
134
+ # nine
135
+ html: |-
136
+ <ol>
137
+ <li>one</li>
138
+ <li>two</li>
139
+ <li>three</li>
140
+ </ol>
141
+ <ol start="4">
142
+ <li>four</li>
143
+ <li>five
144
+ <ol>
145
+ <li>sub-note</li>
146
+ <li>another sub-note</li>
147
+ </ol></li>
148
+ <li>six</li>
149
+ </ol>
150
+ <ol start="7">
151
+ <li>seven</li>
152
+ <li>eight</li>
153
+ <li>nine</li>
154
+ </ol>
155
+ valid_html: false
156
+ comment: there's not a good, valid alternative to the start attribute
157
+ ---
158
+ name: list start number
159
+ in: |-
160
+ #293 two ninety three
161
+ # two ninety four
162
+ # two ninety five
163
+
164
+ #9 nine
165
+ # ten
166
+ # eleven
167
+ html: |-
168
+ <ol start="293">
169
+ <li>two ninety three</li>
170
+ <li>two ninety four</li>
171
+ <li>two ninety five</li>
172
+ </ol>
173
+ <ol start="9">
174
+ <li>nine</li>
175
+ <li>ten</li>
176
+ <li>eleven</li>
177
+ </ol>
178
+ valid_html: false
179
+ comment: there's not a good, valid alternative to the start attribute
180
+ ---
181
+ name: continue list after started list
182
+ in: |-
183
+ #9 nine
184
+ # ten
185
+ # eleven
186
+
187
+ #_ twelve
188
+ # thirteen
189
+ # fourteen
190
+ html: |-
191
+ <ol start="9">
192
+ <li>nine</li>
193
+ <li>ten</li>
194
+ <li>eleven</li>
195
+ </ol>
196
+ <ol start="12">
197
+ <li>twelve</li>
198
+ <li>thirteen</li>
199
+ <li>fourteen</li>
200
+ </ol>
201
+ valid_html: false
202
+ comment: there's not a good, valid alternative to the start attribute
203
+ ---
204
+ name: end notes
205
+ in: |-
206
+ h2. End Notes
207
+
208
+ # End Notes should be a numbered list
209
+ # Like this
210
+ # They must have anchors in the text
211
+
212
+ h2. See Also
213
+
214
+ * See Also notes should be bullets
215
+ * Like this
216
+
217
+ html: |-
218
+ <h2>End Notes</h2>
219
+ <ol>
220
+ <li>End Notes should be a numbered list</li>
221
+ <li>Like this</li>
222
+ <li>They must have anchors in the text</li>
223
+ </ol>
224
+ <h2>See Also</h2>
225
+ <ul>
226
+ <li>See Also notes should be bullets</li>
227
+ <li>Like this</li>
228
+ </ul>
229
+ ---
230
+ name: ordered list immediately following paragraph
231
+ desc: Normally a paragraph and a list that follows it should be separated by two newlines. Textile-2.0.0 recognizes the list even when separated by only one newline, but creates invalid XHTML by placing the list inside the paragraph. RedCloth recognizes the pattern for backward compatibility, but creates valid XHTML.
232
+ in: |-
233
+ A simple example.
234
+ # One
235
+ # Two
236
+ html: |-
237
+ <p>A simple example.</p>
238
+ <ol>
239
+ <li>One</li>
240
+ <li>Two</li>
241
+ </ol>
242
+ ---
243
+ name: unordered list immediately following paragraph
244
+ in: |-
245
+ A simple example.
246
+ * One
247
+ * Two
248
+ html: |-
249
+ <p>A simple example.</p>
250
+ <ul>
251
+ <li>One</li>
252
+ <li>Two</li>
253
+ </ul>
254
+ ---
255
+ name: ordered list immediately following extended block
256
+ in: |-
257
+ div.. Here it comes.
258
+
259
+ A simple example.
260
+ # One
261
+ # Two
262
+ html: |-
263
+ <div>Here it comes.</div>
264
+ <div>A simple example.</div>
265
+ <ol>
266
+ <li>One</li>
267
+ <li>Two</li>
268
+ </ol>
269
+ ---
270
+ name: unordered list immediately following extended block
271
+ in: |-
272
+ div.. Here it comes.
273
+
274
+ A simple example.
275
+ * One
276
+ * Two
277
+ html: |-
278
+ <div>Here it comes.</div>
279
+ <div>A simple example.</div>
280
+ <ul>
281
+ <li>One</li>
282
+ <li>Two</li>
283
+ </ul>
284
+ ---
285
+ name: unordered list with leading spaces
286
+ in: " * notice the leading space\n * RedCloth 3.0.4 used to accept it\n * Now we do too"
287
+ html: |-
288
+ <ul>
289
+ <li>notice the leading space</li>
290
+ <li>RedCloth 3.0.4 used to accept it</li>
291
+ <li>Now we do too</li>
292
+ </ul>
293
+ ---
294
+ name: ordered list with leading spaces
295
+ in: " # notice the leading space\n # RedCloth 3.0.4 used to accept it\n # Now we do too"
296
+ html: |-
297
+ <ol>
298
+ <li>notice the leading space</li>
299
+ <li>RedCloth 3.0.4 used to accept it</li>
300
+ <li>Now we do too</li>
301
+ </ol>
302
+ ---
303
+ name: unordered with classes
304
+ in: |-
305
+ *(class-one) one
306
+ *(class-two) two
307
+ *(class-three) three
308
+ html: |-
309
+ <ul>
310
+ <li class="class-one">one</li>
311
+ <li class="class-two">two</li>
312
+ <li class="class-three">three</li>
313
+ </ul>
314
+ ---
315
+ name: unordered with alignments
316
+ in: |-
317
+ *< one
318
+ *> two
319
+ *<> three
320
+ *= four
321
+ html: |-
322
+ <ul>
323
+ <li style="text-align:left;">one</li>
324
+ <li style="text-align:right;">two</li>
325
+ <li style="text-align:justify;">three</li>
326
+ <li style="text-align:center;">four</li>
327
+ </ul>
328
+ ---
329
+ name: with attributes that apply to the whole list
330
+ in: |-
331
+ (class#id)# one
332
+ # two
333
+ # three
334
+ html: |-
335
+ <ol class="class" id="id">
336
+ <li>one</li>
337
+ <li>two</li>
338
+ <li>three</li>
339
+ </ol>
340
+ ---
341
+ name: with id on the list
342
+ in: |-
343
+ (#my-id)# one
344
+ # two
345
+ # three
346
+ html: |-
347
+ <ol id="my-id">
348
+ <li>one</li>
349
+ <li>two</li>
350
+ <li>three</li>
351
+ </ol>
352
+ ---
353
+ name: with class on the list
354
+ in: |-
355
+ (my-class)# one
356
+ # two
357
+ # three
358
+ html: |-
359
+ <ol class="my-class">
360
+ <li>one</li>
361
+ <li>two</li>
362
+ <li>three</li>
363
+ </ol>
364
+ ---
365
+ name: with id on the list item
366
+ in: |-
367
+ # one
368
+ #(#my-item) two
369
+ # three
370
+ html: |-
371
+ <ol>
372
+ <li>one</li>
373
+ <li id="my-item">two</li>
374
+ <li>three</li>
375
+ </ol>
376
+ ---
377
+ name: with attributes that apply to the first list item
378
+ in: |-
379
+ #(class#id) one
380
+ # two
381
+ # three
382
+ html: |-
383
+ <ol>
384
+ <li class="class" id="id">one</li>
385
+ <li>two</li>
386
+ <li>three</li>
387
+ </ol>
388
+ ---
389
+ name: changed from textism basics
390
+ desc: "This was in Textism basics, but when I changed the format of list styles, I removed it"
391
+ in: |-
392
+ {color:blue}# one
393
+ # two
394
+ # three
395
+ html: |-
396
+ <ol style="color:blue;">
397
+ <li>one</li>
398
+ <li>two</li>
399
+ <li>three</li>
400
+ </ol>
401
+ ---
402
+ name: changed from threshold list attributes
403
+ desc: "Was: 'Attributes applied to the first list item will apply to the list itself.' but then we changed it"
404
+ in: |-
405
+ *{color:red} Item one
406
+ * Item two
407
+ * Item three
408
+ html: |-
409
+ <ul>
410
+ <li style="color:red;">Item one</li>
411
+ <li>Item two</li>
412
+ <li>Item three</li>
413
+ </ul>
414
+ ---
415
+ name: with one padding-left increment
416
+ in: "(# one"
417
+ html: |-
418
+ <ol style="padding-left:1em;">
419
+ <li>one</li>
420
+ </ol>
421
+ ---
422
+ name: with one padding-left increment and class
423
+ in: "((myclass)# one"
424
+ html: |-
425
+ <ol style="padding-left:1em;" class="myclass">
426
+ <li>one</li>
427
+ </ol>
428
+ ---
429
+ name: with two padding-left increments
430
+ in: "((# two"
431
+ html: |-
432
+ <ol style="padding-left:2em;">
433
+ <li>two</li>
434
+ </ol>
435
+ ---
436
+ name: with one padding-right increment
437
+ in: ")# one"
438
+ html: |-
439
+ <ol style="padding-right:1em;">
440
+ <li>one</li>
441
+ </ol>
442
+ ---
443
+ name: with padding-left and padding-right increments
444
+ in: "()# two"
445
+ html: |-
446
+ <ol style="padding-left:1em;padding-right:1em;">
447
+ <li>two</li>
448
+ </ol>
449
+ ---
450
+ name: with padding-left and padding-right increments switched
451
+ in: ")(# two"
452
+ html: |-
453
+ <ol style="padding-left:1em;padding-right:1em;">
454
+ <li>two</li>
455
+ </ol>
456
+ ---
457
+ name: with padding-left and padding-right increments and class
458
+ in: "()(myclass)# two"
459
+ html: |-
460
+ <ol style="padding-left:1em;padding-right:1em;" class="myclass">
461
+ <li>two</li>
462
+ </ol>