codepre += 1
used_offtags[offtag] = true
if codepre - used_offtags.length > 0
- htmlesc( line, :NoQuotes ) unless used_offtags['notextile']
+ htmlesc( line, :NoQuotes )
@pre_list.last << line
line = ""
else
- htmlesc( aftertag, :NoQuotes ) if aftertag and not used_offtags['notextile']
+ htmlesc( aftertag, :NoQuotes ) if aftertag
line = "<redpre##{ @pre_list.length }>"
@pre_list << "#{ $3 }#{ aftertag }"
end
elsif $1 and codepre > 0
if codepre - used_offtags.length > 0
- htmlesc( line, :NoQuotes ) unless used_offtags['notextile']
+ htmlesc( line, :NoQuotes )
@pre_list.last << line
line = ""
end
to_test = {
"<pre>preformatted text</pre>" => "<pre>preformatted text</pre>",
"<notextile>no *textile* formatting</notextile>" => "no *textile* formatting",
+ "<notextile>this is <tag>a tag</tag></notextile>" => "this is <tag>a tag</tag>"
}
to_test.each { |text, result| assert_equal result, textilizable(text) }
end