@@ -439,6 +439,10 module ApplicationHelper | |||
|
439 | 439 | parsed << full_tag |
|
440 | 440 | end |
|
441 | 441 | end |
|
442 | # Close any non closing tags | |
|
443 | while tag = tags.pop | |
|
444 | parsed << "</#{tag}>" | |
|
445 | end | |
|
442 | 446 | parsed |
|
443 | 447 | end |
|
444 | 448 |
@@ -324,6 +324,20 EXPECTED | |||
|
324 | 324 | assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') |
|
325 | 325 | end |
|
326 | 326 | |
|
327 | def test_non_closing_pre_blocks_should_be_closed | |
|
328 | raw = <<-RAW | |
|
329 | <pre><code> | |
|
330 | RAW | |
|
331 | ||
|
332 | expected = <<-EXPECTED | |
|
333 | <pre><code> | |
|
334 | </code></pre> | |
|
335 | EXPECTED | |
|
336 | ||
|
337 | @project = Project.find(1) | |
|
338 | assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') | |
|
339 | end | |
|
340 | ||
|
327 | 341 | def test_syntax_highlight |
|
328 | 342 | raw = <<-RAW |
|
329 | 343 | <pre><code class="ruby"> |
General Comments 0
You need to be logged in to leave comments.
Login now