Merged r9822 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@9842 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
033aa68427
commit
8cd0baf773
@ -8,6 +8,7 @@ http://www.redmine.org/
|
|||||||
|
|
||||||
* Defect #11061: Cannot choose commit versions to view differences in Git/Mercurial repository view
|
* Defect #11061: Cannot choose commit versions to view differences in Git/Mercurial repository view
|
||||||
* Defect #11112: REST API - custom fields in POST/PUT ignored for time_entries
|
* Defect #11112: REST API - custom fields in POST/PUT ignored for time_entries
|
||||||
|
* Defect #11133: Wiki-page section edit link can point to incorrect section
|
||||||
* Feature #6597: Configurable session lifetime and timeout
|
* Feature #6597: Configurable session lifetime and timeout
|
||||||
* Patch #11113: Small glitch in German localization
|
* Patch #11113: Small glitch in German localization
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ module Redmine
|
|||||||
l = 1
|
l = 1
|
||||||
started = false
|
started = false
|
||||||
ended = false
|
ended = false
|
||||||
text.scan(/(((?:.*?)(\A|\r?\n\r?\n))(h(\d+)(#{A}#{C})\.(?::(\S+))? (.*?)$)|.*)/m).each do |all, content, lf, heading, level|
|
text.scan(/(((?:.*?)(\A|\r?\n\s*\r?\n))(h(\d+)(#{A}#{C})\.(?::(\S+))? (.*?)$)|.*)/m).each do |all, content, lf, heading, level|
|
||||||
if heading.nil?
|
if heading.nil?
|
||||||
if ended
|
if ended
|
||||||
after << all
|
after << all
|
||||||
|
@ -394,6 +394,31 @@ Nulla nunc nisi, egestas in ornare vel, posuere ac libero."]
|
|||||||
@formatter.new(text).update_section(3, replacement)
|
@formatter.new(text).update_section(3, replacement)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_get_section_should_support_lines_with_spaces_before_heading
|
||||||
|
# the lines after Content 2 and Heading 4 contain a space
|
||||||
|
text = <<-STR
|
||||||
|
h1. Heading 1
|
||||||
|
|
||||||
|
Content 1
|
||||||
|
|
||||||
|
h1. Heading 2
|
||||||
|
|
||||||
|
Content 2
|
||||||
|
|
||||||
|
h1. Heading 3
|
||||||
|
|
||||||
|
Content 3
|
||||||
|
|
||||||
|
h1. Heading 4
|
||||||
|
|
||||||
|
Content 4
|
||||||
|
STR
|
||||||
|
|
||||||
|
[1, 2, 3, 4].each do |index|
|
||||||
|
assert_match /\Ah1. Heading #{index}.+Content #{index}/m, @formatter.new(text).get_section(index).first
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def assert_html_output(to_test, expect_paragraph = true)
|
def assert_html_output(to_test, expect_paragraph = true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user