##// END OF EJS Templates
Remove pre tag attributes....
Jean-Philippe Lang -
r1928:2ed9aa13f3f3
parent child
Show More
@@ -1051,7 +1051,7 class RedCloth3 < String
1051 1051 else
1052 1052 htmlesc( aftertag, :NoQuotes ) if aftertag
1053 1053 line = "<redpre##{ @pre_list.length }>"
1054 @pre_list << "#{ $3 }#{ aftertag }"
1054 @pre_list << "#{ $3.gsub(/<(#{ OFFTAGS })[^>]*>/, '<\\1>') }#{ aftertag }"
1055 1055 end
1056 1056 elsif $1 and codepre > 0
1057 1057 if codepre - used_offtags.length > 0
@@ -181,7 +181,9 class ApplicationHelperTest < HelperTestCase
181 181 "<pre><code>\nline 1\nline2</code></pre>" => "<pre><code>\nline 1\nline2</code></pre>",
182 182 "<pre><div>content</div></pre>" => "<pre>&lt;div&gt;content&lt;/div&gt;</pre>",
183 183 "HTML comment: <!-- no comments -->" => "<p>HTML comment: &lt;!-- no comments --&gt;</p>",
184 "<!-- opening comment" => "<p>&lt;!-- opening comment</p>"
184 "<!-- opening comment" => "<p>&lt;!-- opening comment</p>",
185 # remove attributes
186 "<pre class='foo'>some text</pre>" => "<pre>some text</pre>",
185 187 }
186 188 to_test.each { |text, result| assert_equal result, textilizable(text) }
187 189 end
General Comments 0
You need to be logged in to leave comments. Login now