@@ -609,7 +609,7 module ApplicationHelper | |||
|
609 | 609 | parsed << text |
|
610 | 610 | if tag |
|
611 | 611 | if closing |
|
612 | if tags.last.casecmp(tag) == 0 | |
|
612 | if tags.last && tags.last.casecmp(tag) == 0 | |
|
613 | 613 | tags.pop |
|
614 | 614 | end |
|
615 | 615 | else |
@@ -994,6 +994,12 EXPECTED | |||
|
994 | 994 | assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') |
|
995 | 995 | end |
|
996 | 996 | |
|
997 | def test_unbalanced_closing_pre_tag_should_not_error | |
|
998 | assert_nothing_raised do | |
|
999 | textilizable("unbalanced</pre>") | |
|
1000 | end | |
|
1001 | end | |
|
1002 | ||
|
997 | 1003 | def test_syntax_highlight |
|
998 | 1004 | raw = <<-RAW |
|
999 | 1005 | <pre><code class="ruby"> |
General Comments 0
You need to be logged in to leave comments.
Login now