@@ -439,6 +439,10 module ApplicationHelper | |||||
439 | parsed << full_tag |
|
439 | parsed << full_tag | |
440 | end |
|
440 | end | |
441 | end |
|
441 | end | |
|
442 | # Close any non closing tags | |||
|
443 | while tag = tags.pop | |||
|
444 | parsed << "</#{tag}>" | |||
|
445 | end | |||
442 | parsed |
|
446 | parsed | |
443 | end |
|
447 | end | |
444 |
|
448 |
@@ -324,6 +324,20 EXPECTED | |||||
324 | assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') |
|
324 | assert_equal expected.gsub(%r{[\r\n\t]}, ''), textilizable(raw).gsub(%r{[\r\n\t]}, '') | |
325 | end |
|
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 | def test_syntax_highlight |
|
341 | def test_syntax_highlight | |
328 | raw = <<-RAW |
|
342 | raw = <<-RAW | |
329 | <pre><code class="ruby"> |
|
343 | <pre><code class="ruby"> |
General Comments 0
You need to be logged in to leave comments.
Login now