@@ -8,6 +8,7 http://www.redmine.org/ | |||
|
8 | 8 | |
|
9 | 9 | * Defect #11061: Cannot choose commit versions to view differences in Git/Mercurial repository view |
|
10 | 10 | * Defect #11112: REST API - custom fields in POST/PUT ignored for time_entries |
|
11 | * Defect #11133: Wiki-page section edit link can point to incorrect section | |
|
11 | 12 | * Feature #6597: Configurable session lifetime and timeout |
|
12 | 13 | * Patch #11113: Small glitch in German localization |
|
13 | 14 |
@@ -69,7 +69,7 module Redmine | |||
|
69 | 69 | l = 1 |
|
70 | 70 | started = false |
|
71 | 71 | ended = false |
|
72 | text.scan(/(((?:.*?)(\A|\r?\n\r?\n))(h(\d+)(#{A}#{C})\.(?::(\S+))? (.*?)$)|.*)/m).each do |all, content, lf, heading, level| | |
|
72 | text.scan(/(((?:.*?)(\A|\r?\n\s*\r?\n))(h(\d+)(#{A}#{C})\.(?::(\S+))? (.*?)$)|.*)/m).each do |all, content, lf, heading, level| | |
|
73 | 73 | if heading.nil? |
|
74 | 74 | if ended |
|
75 | 75 | after << all |
@@ -394,6 +394,31 Nulla nunc nisi, egestas in ornare vel, posuere ac libero."] | |||
|
394 | 394 | @formatter.new(text).update_section(3, replacement) |
|
395 | 395 | end |
|
396 | 396 | |
|
397 | def test_get_section_should_support_lines_with_spaces_before_heading | |
|
398 | # the lines after Content 2 and Heading 4 contain a space | |
|
399 | text = <<-STR | |
|
400 | h1. Heading 1 | |
|
401 | ||
|
402 | Content 1 | |
|
403 | ||
|
404 | h1. Heading 2 | |
|
405 | ||
|
406 | Content 2 | |
|
407 | ||
|
408 | h1. Heading 3 | |
|
409 | ||
|
410 | Content 3 | |
|
411 | ||
|
412 | h1. Heading 4 | |
|
413 | ||
|
414 | Content 4 | |
|
415 | STR | |
|
416 | ||
|
417 | [1, 2, 3, 4].each do |index| | |
|
418 | assert_match /\Ah1. Heading #{index}.+Content #{index}/m, @formatter.new(text).get_section(index).first | |
|
419 | end | |
|
420 | end | |
|
421 | ||
|
397 | 422 | private |
|
398 | 423 | |
|
399 | 424 | def assert_html_output(to_test, expect_paragraph = true) |
General Comments 0
You need to be logged in to leave comments.
Login now