@@ -1045,17 +1045,17 class RedCloth3 < String | |||||
1045 | codepre += 1 |
|
1045 | codepre += 1 | |
1046 | used_offtags[offtag] = true |
|
1046 | used_offtags[offtag] = true | |
1047 | if codepre - used_offtags.length > 0 |
|
1047 | if codepre - used_offtags.length > 0 | |
1048 |
htmlesc( line, :NoQuotes ) |
|
1048 | htmlesc( line, :NoQuotes ) | |
1049 | @pre_list.last << line |
|
1049 | @pre_list.last << line | |
1050 | line = "" |
|
1050 | line = "" | |
1051 | else |
|
1051 | else | |
1052 |
htmlesc( aftertag, :NoQuotes ) if aftertag |
|
1052 | htmlesc( aftertag, :NoQuotes ) if aftertag | |
1053 | line = "<redpre##{ @pre_list.length }>" |
|
1053 | line = "<redpre##{ @pre_list.length }>" | |
1054 | @pre_list << "#{ $3 }#{ aftertag }" |
|
1054 | @pre_list << "#{ $3 }#{ aftertag }" | |
1055 | end |
|
1055 | end | |
1056 | elsif $1 and codepre > 0 |
|
1056 | elsif $1 and codepre > 0 | |
1057 | if codepre - used_offtags.length > 0 |
|
1057 | if codepre - used_offtags.length > 0 | |
1058 |
htmlesc( line, :NoQuotes ) |
|
1058 | htmlesc( line, :NoQuotes ) | |
1059 | @pre_list.last << line |
|
1059 | @pre_list.last << line | |
1060 | line = "" |
|
1060 | line = "" | |
1061 | end |
|
1061 | end |
@@ -190,6 +190,7 class ApplicationHelperTest < HelperTestCase | |||||
190 | to_test = { |
|
190 | to_test = { | |
191 | "<pre>preformatted text</pre>" => "<pre>preformatted text</pre>", |
|
191 | "<pre>preformatted text</pre>" => "<pre>preformatted text</pre>", | |
192 | "<notextile>no *textile* formatting</notextile>" => "no *textile* formatting", |
|
192 | "<notextile>no *textile* formatting</notextile>" => "no *textile* formatting", | |
|
193 | "<notextile>this is <tag>a tag</tag></notextile>" => "this is <tag>a tag</tag>" | |||
193 | } |
|
194 | } | |
194 | to_test.each { |text, result| assert_equal result, textilizable(text) } |
|
195 | to_test.each { |text, result| assert_equal result, textilizable(text) } | |
195 | end |
|
196 | end |
General Comments 0
You need to be logged in to leave comments.
Login now