@@ -57,7 +57,7 module Redmine | |||
|
57 | 57 | def extract_sections(index) |
|
58 | 58 | @pre_list = [] |
|
59 | 59 | text = self.dup |
|
60 | rip_offtags text | |
|
60 | rip_offtags text, false | |
|
61 | 61 | before = '' |
|
62 | 62 | s = '' |
|
63 | 63 | after = '' |
@@ -286,6 +286,8 Pre Content: | |||
|
286 | 286 | |
|
287 | 287 | h2. Inside pre |
|
288 | 288 | |
|
289 | <tag> inside pre block | |
|
290 | ||
|
289 | 291 | Morbi facilisis accumsan orci non pharetra. |
|
290 | 292 | </pre>", |
|
291 | 293 | # 2 |
@@ -300,6 +302,14 Nulla nunc nisi, egestas in ornare vel, posuere ac libero."] | |||
|
300 | 302 | assert_section_with_hash STR_WITH_PRE[2], text, 3 |
|
301 | 303 | end |
|
302 | 304 | |
|
305 | def test_update_section_should_not_escape_pre_content_outside_section | |
|
306 | text = STR_WITH_PRE.join("\n\n") | |
|
307 | replacement = "New text" | |
|
308 | ||
|
309 | assert_equal [STR_WITH_PRE[0..1], "New text"].flatten.join("\n\n"), | |
|
310 | @formatter.new(text).update_section(3, replacement) | |
|
311 | end | |
|
312 | ||
|
303 | 313 | private |
|
304 | 314 | |
|
305 | 315 | def assert_html_output(to_test, expect_paragraph = true) |
General Comments 0
You need to be logged in to leave comments.
Login now