RedCloth 4.1.9-universal-java → 4.2.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 (68) hide show
  1. data/CHANGELOG +55 -0
  2. data/Manifest +34 -38
  3. data/README +17 -5
  4. data/Rakefile +79 -30
  5. data/RedCloth.gemspec +8 -9
  6. data/ext/redcloth_scan/redcloth.h +38 -13
  7. data/lib/redcloth.rb +9 -3
  8. data/lib/redcloth/formatters/html.rb +2 -2
  9. data/lib/redcloth/formatters/latex.rb +99 -54
  10. data/lib/redcloth/formatters/latex_entities.yml +2 -2
  11. data/lib/redcloth/version.rb +9 -4
  12. data/lib/redcloth_scan.jar +0 -0
  13. data/lib/tasks/pureruby.rake +12 -0
  14. data/spec/custom_tags_spec.rb +50 -0
  15. data/spec/differs/inline.rb +48 -0
  16. data/{test/test_erb.rb → spec/erb_spec.rb} +6 -9
  17. data/spec/extension_spec.rb +26 -0
  18. data/{test → spec/fixtures}/basic.yml +90 -4
  19. data/{test → spec/fixtures}/code.yml +29 -0
  20. data/{test → spec/fixtures}/definitions.yml +0 -0
  21. data/{test → spec/fixtures}/extra_whitespace.yml +0 -0
  22. data/{test → spec/fixtures}/filter_html.yml +0 -0
  23. data/{test → spec/fixtures}/filter_pba.yml +0 -0
  24. data/{test → spec/fixtures}/html.yml +15 -0
  25. data/{test → spec/fixtures}/images.yml +16 -6
  26. data/{test → spec/fixtures}/instiki.yml +0 -0
  27. data/{test → spec/fixtures}/links.yml +7 -1
  28. data/{test → spec/fixtures}/lists.yml +162 -1
  29. data/{test → spec/fixtures}/poignant.yml +0 -0
  30. data/{test → spec/fixtures}/sanitize_html.yml +0 -0
  31. data/{test → spec/fixtures}/table.yml +121 -23
  32. data/{test → spec/fixtures}/textism.yml +44 -15
  33. data/{test → spec/fixtures}/threshold.yml +6 -14
  34. data/spec/formatters/class_filtered_html_spec.rb +7 -0
  35. data/spec/formatters/filtered_html_spec.rb +7 -0
  36. data/spec/formatters/html_no_breaks_spec.rb +9 -0
  37. data/spec/formatters/html_spec.rb +13 -0
  38. data/spec/formatters/id_filtered_html_spec.rb +7 -0
  39. data/spec/formatters/latex_spec.rb +13 -0
  40. data/spec/formatters/lite_mode_html_spec.rb +7 -0
  41. data/spec/formatters/no_span_caps_html_spec.rb +7 -0
  42. data/spec/formatters/sanitized_html_spec.rb +7 -0
  43. data/spec/formatters/style_filtered_html_spec.rb +7 -0
  44. data/spec/parser_spec.rb +95 -0
  45. data/spec/spec.opts +3 -0
  46. data/spec/spec_helper.rb +42 -0
  47. metadata +46 -51
  48. data/ext/mingw-rbconfig.rb +0 -176
  49. data/ext/redcloth_scan/redcloth_attributes.c.rl +0 -55
  50. data/ext/redcloth_scan/redcloth_attributes.java.rl +0 -95
  51. data/ext/redcloth_scan/redcloth_attributes.rl +0 -33
  52. data/ext/redcloth_scan/redcloth_common.c.rl +0 -18
  53. data/ext/redcloth_scan/redcloth_common.java.rl +0 -18
  54. data/ext/redcloth_scan/redcloth_common.rl +0 -115
  55. data/ext/redcloth_scan/redcloth_inline.c.rl +0 -193
  56. data/ext/redcloth_scan/redcloth_inline.java.rl +0 -140
  57. data/ext/redcloth_scan/redcloth_inline.rl +0 -156
  58. data/ext/redcloth_scan/redcloth_scan.c.rl +0 -228
  59. data/ext/redcloth_scan/redcloth_scan.java.rl +0 -577
  60. data/ext/redcloth_scan/redcloth_scan.rl +0 -320
  61. data/extras/ragel_profiler.rb +0 -73
  62. data/test/helper.rb +0 -108
  63. data/test/test_custom_tags.rb +0 -58
  64. data/test/test_extensions.rb +0 -31
  65. data/test/test_formatters.rb +0 -24
  66. data/test/test_parser.rb +0 -73
  67. data/test/test_restrictions.rb +0 -41
  68. data/test/validate_fixtures.rb +0 -74
@@ -0,0 +1,48 @@
1
+ require "spec/runner/differs/load-diff-lcs"
2
+ require 'pp'
3
+
4
+ module RedClothDiffers
5
+ unless defined?(Inline)
6
+ class Inline
7
+ def initialize(options)
8
+ @options = options
9
+ end
10
+
11
+ DIFF_ASCII_COLORS = {
12
+ "=" => "\e[0m",
13
+ "+" => "\e[42m",
14
+ "-" => "\e[41m",
15
+ "!" => "\e[43m"
16
+ }
17
+
18
+ def diff_as_string(data_new, data_old)
19
+ output = "\e[0m"
20
+ last_action = nil
21
+ sdiff = Diff::LCS.sdiff(data_old, data_new)
22
+ sdiff.each do |change|
23
+ unless change.action == last_action
24
+ output << DIFF_ASCII_COLORS[change.action]
25
+ last_action = change.action
26
+ end
27
+ output << case change.action
28
+ when "+"
29
+ change.new_element
30
+ when "-"
31
+ change.old_element
32
+ when "="
33
+ change.old_element
34
+ when "!"
35
+ change.old_element
36
+ end
37
+ end
38
+
39
+ output
40
+ end
41
+
42
+ def diff_as_object(target,expected)
43
+ diff_as_string(PP.pp(target,""), PP.pp(expected,""))
44
+ end
45
+ end
46
+
47
+ end
48
+ end
@@ -1,13 +1,10 @@
1
- #!/usr/bin/env ruby
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
2
 
3
- require File.join(File.dirname(__FILE__), 'helper')
4
-
5
- class TestErb < Test::Unit::TestCase
6
-
7
- def test_redcloth_erb
3
+ describe "ERB helper" do
4
+ it "should add a textile tag to ERB" do
8
5
  template = %{<%=t "This new ERB tag makes is so _easy_ to use *RedCloth*" %>}
9
6
  expected = %{<p>This new <span class="caps">ERB</span> tag makes is so <em>easy</em> to use <strong>RedCloth</strong></p>}
10
- assert_equal expected, ERB.new(template).result
7
+
8
+ ERB.new(template).result.should == expected
11
9
  end
12
-
13
- end
10
+ end
@@ -0,0 +1,26 @@
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
+
3
+ # http://www.ralree.info/2006/9/13/extending-redcloth
4
+ module RedClothSmileyExtension
5
+ def refs_smiley(text)
6
+ text.gsub!(/(\s)~(:P|:D|:O|:o|:S|:\||;\)|:'\(|:\)|:\()/) do |m|
7
+ bef,ma = $~[1..2]
8
+ filename = "/images/emoticons/"+(ma.unpack("c*").join('_'))+".png"
9
+ "#{bef}<img src='#{filename}' title='#{ma}' class='smiley' />"
10
+ end
11
+ end
12
+ end
13
+
14
+ RedCloth.send(:include, RedClothSmileyExtension)
15
+
16
+ describe RedClothSmileyExtension do
17
+
18
+ it "should include the extension" do
19
+ input = %Q{You're so silly! ~:P}
20
+
21
+ html = %Q{<p>You&#8217;re so silly! <img src='/images/emoticons/58_80.png' title=':P' class='smiley' /></p>}
22
+
23
+ RedCloth.new(input).to_html(:textile, :refs_smiley).should == html
24
+ end
25
+
26
+ end
@@ -9,6 +9,14 @@ html: |-
9
9
  <p>A single paragraph.</p>
10
10
  <p>Followed by another.</p>
11
11
  ---
12
+ name: blocks with spaces on the blank line in between
13
+ in: "This is line one\n \nThis is line two"
14
+ html: "<p>This is line one</p>\n<p>This is line two</p>"
15
+ ---
16
+ name: blocks with tabl on the blank line in between
17
+ in: "This is line one\n\t\nThis is line two"
18
+ html: "<p>This is line one</p>\n<p>This is line two</p>"
19
+ ---
12
20
  name: block containing block start
13
21
  in: |-
14
22
  I saw a ship. It ate my elephant.
@@ -43,6 +51,24 @@ html: |-
43
51
  <p>When the elephant comes to take a p. you&#8230;</p>
44
52
  </blockquote>
45
53
  ---
54
+ name: notextile block
55
+ in: |-
56
+ Some text:
57
+
58
+ <notextile>
59
+ <div class="example"><pre>
60
+ Some code
61
+ </pre></div>
62
+ </notextile>
63
+
64
+ Some more text.
65
+ html: |-
66
+ <p>Some text:</p>
67
+ <div class="example"><pre>
68
+ Some code
69
+ </pre></div>
70
+ <p>Some more text.</p>
71
+ ---
46
72
  name: notextile block containing block start
47
73
  in: |-
48
74
  notextile. I saw a ship. It ate my elephant.
@@ -569,6 +595,10 @@ html: <p>We use <acronym title="Cascading Style Sheets"><span class="caps">CSS</
569
595
  lite_mode_html: We use <acronym title="Cascading Style Sheets"><span class="caps">CSS</span></acronym>.
570
596
  no_span_caps_html: <p>We use <acronym title="Cascading Style Sheets">CSS</acronym>.</p>
571
597
  ---
598
+ name: two-letter acronyms
599
+ in: It employs AI(artificial intelligence) processing.
600
+ html: <p>It employs <acronym title="artificial intelligence"><span class="caps">AI</span></acronym> processing.</p>
601
+ ---
572
602
  name: tables
573
603
  desc: Simple tables can be built by separating fields with pipe characters
574
604
  in: |-
@@ -712,7 +742,7 @@ html: |-
712
742
  </tr>
713
743
  </table>
714
744
  ---
715
- name: black attributes applied to a table
745
+ name: block attributes applied to a table
716
746
  desc: Table-wide attributes can be applied before the first row of the table. On its own line, followed by a period.
717
747
  in: |-
718
748
  table{border:1px solid black}.
@@ -734,7 +764,7 @@ html: |-
734
764
  </tr>
735
765
  </table>
736
766
  ---
737
- name: black attributes applied to a table row
767
+ name: block attributes applied to a table row
738
768
  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.
739
769
  in: |-
740
770
  |This|is|a|row|
@@ -923,10 +953,66 @@ in: |-
923
953
 
924
954
  Some more text.
925
955
  html: |-
926
- <p>Just some <em>_</em> text</p>
956
+ <p>Just some ___ text</p>
927
957
  <hr />
928
958
  <p>Some more text.</p>
929
959
  ---
930
960
  name: lang attribute cannot contain square brackets
931
961
  in: "some @[[code]]@"
932
- html: "<p>some <code>[[code]]</code></p>"
962
+ html: "<p>some <code>[[code]]</code></p>"
963
+ ---
964
+ name: pre blocks preserve leading whitespace
965
+ in: |-
966
+ pre. Text in a pre block
967
+ is displayed in a fixed-width
968
+ font. It preserves
969
+ s p a c e s, line breaks
970
+ and ascii bunnies.
971
+ html: |-
972
+ <pre> Text in a pre block
973
+ is displayed in a fixed-width
974
+ font. It preserves
975
+ s p a c e s, line breaks
976
+ and ascii bunnies.</pre>
977
+ ---
978
+ name: code blocks preserve leading whitespace
979
+ in: |-
980
+ bc. false
981
+ } else {
982
+ html: |-
983
+ <pre><code> false
984
+ } else {</code></pre>
985
+ ---
986
+ name: citation ending with question mark
987
+ in: "??What the Story Morning Glory???"
988
+ html: |-
989
+ <p><cite>What the Story Morning Glory?</cite></p>
990
+ ---
991
+ name: citation including question mark
992
+ in: "??What's the Matter with Kansas? How Conservatives Won the Heart of America?? is a great book!"
993
+ html: |-
994
+ <p><cite>What&#8217;s the Matter with Kansas? How Conservatives Won the Heart of America</cite> is a great book!</p>
995
+ ---
996
+ name: emphasized word including underscore
997
+ in: |-
998
+ _trythis_ it will keep the empahsis.
999
+ _and_this_too_ it should keep the emphasis but does not with redcloth.
1000
+ html: |-
1001
+ <p><em>trythis</em> it will keep the empahsis.<br />
1002
+ <em>and_this_too</em> it should keep the emphasis but does not with redcloth.</p>
1003
+ ---
1004
+ name: code captures spaces when made explicit with square brackets
1005
+ in: "Start a paragraph with [@p. @] (that's p, a period, and a space)."
1006
+ html: "<p>Start a paragraph with <code>p. </code> (that&#8217;s p, a period, and a space).</p>"
1007
+ ---
1008
+ name: unrecognized block starting with t not eaten
1009
+ in: "tel. 0 700 123 123"
1010
+ html: "<p>tel. 0 700 123 123</p>"
1011
+ ---
1012
+ name: bolded number at start of phrase
1013
+ in: "*22 watermelons* is my limit"
1014
+ html: "<p><strong>22 watermelons</strong> is my limit</p>"
1015
+ ---
1016
+ name: bolded paragraph
1017
+ in: "*- I would expect it to be a bolded paragraph.*"
1018
+ html: <p><strong>- I would expect it to be a bolded paragraph.</strong></p>
@@ -2,24 +2,36 @@
2
2
  name: inline code
3
3
  in: 'This is an empty dictionary: @{}@'
4
4
  html: '<p>This is an empty dictionary: <code>{}</code></p>'
5
+ latex: "This is an empty dictionary: \\verb@{}@\n\n"
6
+ ---
7
+ name: inline snip
8
+ in: "The ```command``` is here."
9
+ html: "<p>The <pre><code>command</code></pre>\n is here.</p>"
10
+ latex: "The \\verb`command` is here.\n\n"
5
11
  ---
6
12
  name: inline code escapement
7
13
  in: 'Please type @cat "file.txt" > otherfile.txt@ at the prompt.'
8
14
  html: '<p>Please type <code>cat "file.txt" &gt; otherfile.txt</code> at the prompt.</p>'
15
+ latex: "Please type \\verb@cat \"file.txt\" > otherfile.txt@ at the prompt.\n\n"
9
16
  ---
10
17
  name: inline code escapement with digits
11
18
  in: |-
12
19
  Regex-based string substitution with Ruby's gsub!: @"123<789".gsub!(/</, "") => "123789"@
13
20
  html: |-
14
21
  <p>Regex-based string substitution with Ruby&#8217;s gsub!: <code>"123&lt;789".gsub!(/&lt;/, "") =&gt; "123789"</code></p>
22
+ latex: |+
23
+ Regex-based string substitution with Ruby's gsub!: \verb@"123<789".gsub!(/</, "") => "123789"@
24
+
15
25
  ---
16
26
  name: inlne code escapement describing textile paragraph styling
17
27
  in: 'This paragraph is aligned left but if you add this: @p>.@ to the beginning it will be aligned right.'
18
28
  html: '<p>This paragraph is aligned left but if you add this: <code>p&gt;.</code> to the beginning it will be aligned right.</p>'
29
+ latex: "This paragraph is aligned left but if you add this: \\verb@p>.@ to the beginning it will be aligned right.\n\n"
19
30
  ---
20
31
  name: escapes code snippet containing html tag
21
32
  in: 'At the top of each page, please put @<h2>Title</h2>@ in the HTML.'
22
33
  html: '<p>At the top of each page, please put <code>&lt;h2&gt;Title&lt;/h2&gt;</code> in the <span class="caps">HTML</span>.</p>'
34
+ latex: "At the top of each page, please put \\verb@<h2>Title</h2>@ in the HTML.\n\n"
23
35
  ---
24
36
  name: escaping in blockcode
25
37
  in: 'bc. This is within a block of code, so < and > should be entities. You can talk about a <p class="foo"> tag if you wish and it will be properly escaped.'
@@ -127,6 +139,13 @@ html: |-
127
139
  <li><code>bar</code></li>
128
140
  <li>and <code>x</code> is also.</li>
129
141
  </ul>
142
+ latex: |+
143
+ \begin{itemize}
144
+ \item \verb@foo@
145
+ \item \verb@bar@
146
+ \item and \verb@x@ is also.
147
+ \end{itemize}
148
+
130
149
  ---
131
150
  name: extended block code
132
151
  in: |-
@@ -226,3 +245,13 @@ valid_html: false
226
245
  name: code containing parentheses
227
246
  in: 'p. @some_method(some_params, some => test);@ Oh dear this fails'
228
247
  html: '<p><code>some_method(some_params, some =&gt; test);</code> Oh dear this fails</p>'
248
+ latex: "\\verb@some_method(some_params, some => test);@ Oh dear this fails\n\n"
249
+ ---
250
+ name: code preserves initial square brackets
251
+ description: usually square brackets are used for the language (English, French, Spanish...), but that doesn't make sense for code and apparently is needed for some computer languages.
252
+ in: @[project]_dff.skjd@
253
+ html: <p><code>[project]_dff.skjd</code></p>
254
+ ---
255
+ name: following also bracketed code in same line
256
+ in: "Some [@code@] and some [@more code@]."
257
+ html: "<p>Some <code>code</code> and some <code>more code</code>.</p>"
File without changes
File without changes
File without changes
@@ -29,6 +29,21 @@ html: |-
29
29
  if you break.</li>
30
30
  </ul>
31
31
  ---
32
+ name: line breaks
33
+ desc: Explicit HTML line breaks are not double-broken
34
+ in: |-
35
+ I spoke.<br />
36
+ And none replied.
37
+ html: |-
38
+ <p>I spoke.<br />
39
+ And none replied.</p>
40
+ html_no_breaks: |-
41
+ <p>I spoke.<br />
42
+ And none replied.</p>
43
+ lite_mode_html: |-
44
+ I spoke.<br />
45
+ And none replied.
46
+ ---
32
47
  name: mixing of textile and XHTML
33
48
  in: |-
34
49
  <img src="test.jpg" alt="test" />
@@ -2,7 +2,8 @@
2
2
  in: This is an !image.jpg!
3
3
  html: <p>This is an <img src="image.jpg" alt="" /></p>
4
4
  latex: |+
5
- This is an \begin{figure}[htp]
5
+ This is an \begin{figure}
6
+ \centering
6
7
  \includegraphics[]{image.jpg}
7
8
  \end{figure}
8
9
 
@@ -10,7 +11,8 @@ latex: |+
10
11
  in: This is an !image.jpg(with alt text)!
11
12
  html: <p>This is an <img src="image.jpg" title="with alt text" alt="with alt text" /></p>
12
13
  latex: |+
13
- This is an \begin{figure}[htp]
14
+ This is an \begin{figure}
15
+ \centering
14
16
  \includegraphics[]{image.jpg}
15
17
  \caption{with alt text}
16
18
  \end{figure}
@@ -192,7 +194,8 @@ name: image with relative src with dot
192
194
  in: "!../../image.jpg!"
193
195
  html: <p><img src="../../image.jpg" alt="" /></p>
194
196
  latex: |+
195
- \begin{figure}[htp]
197
+ \begin{figure}
198
+ \centering
196
199
  \includegraphics[]{../../image.jpg}
197
200
  \end{figure}
198
201
 
@@ -225,7 +228,8 @@ name: image attributes has ampersand html entity in alt and title
225
228
  in: "!/pictures/cat_and_fox.jpg(Trady Blix & The cartoon fox)!"
226
229
  html: '<p><img src="/pictures/cat_and_fox.jpg" title="Trady Blix &amp; The cartoon fox" alt="Trady Blix &amp; The cartoon fox" /></p>'
227
230
  latex: |+
228
- \begin{figure}[htp]
231
+ \begin{figure}
232
+ \centering
229
233
  \includegraphics[]{/pictures/cat_and_fox.jpg}
230
234
  \caption{Trady Blix \& The cartoon fox}
231
235
  \end{figure}
@@ -235,7 +239,8 @@ name: image attributes has double quote html entity in alt and title
235
239
  in: '!/pictures/bacon.jpg(The fox said: "Have some chunky bacon")!'
236
240
  html: '<p><img src="/pictures/bacon.jpg" title="The fox said: &quot;Have some chunky bacon&quot;" alt="The fox said: &quot;Have some chunky bacon&quot;" /></p>'
237
241
  latex: |+
238
- \begin{figure}[htp]
242
+ \begin{figure}
243
+ \centering
239
244
  \includegraphics[]{/pictures/bacon.jpg}
240
245
  \caption{The fox said: "Have some chunky bacon"}
241
246
  \end{figure}
@@ -266,4 +271,9 @@ html: |-
266
271
  name: with link that contains parentheses
267
272
  in: "!image.jpg(Alt text with (parentheses).)!"
268
273
  html: |-
269
- <p><img src="image.jpg" title="Alt text with (parentheses)." alt="Alt text with (parentheses)." /></p>
274
+ <p><img src="image.jpg" title="Alt text with (parentheses)." alt="Alt text with (parentheses)." /></p>
275
+ ---
276
+ name: with link and title and text afterward
277
+ in: "!/image_r.jpg(description)!:image.jpg text."
278
+ html: |-
279
+ <p><a href="image.jpg"><img src="/image_r.jpg" title="description" alt="description" /></a> text.</p>
File without changes
@@ -282,4 +282,10 @@ name: with caps in the title
282
282
  in: |-
283
283
  "British Skin Foundation (BSF)":http://www.britishskinfoundation.org.uk
284
284
  html: |-
285
- <p><a href="http://www.britishskinfoundation.org.uk" title="BSF">British Skin Foundation</a></p>
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>
@@ -298,4 +298,165 @@ html: |-
298
298
  <li>notice the leading space</li>
299
299
  <li>RedCloth 3.0.4 used to accept it</li>
300
300
  <li>Now we do too</li>
301
- </ol>
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>