##// END OF EJS Templates
Fixed: Cannot edit a wiki section which title starts with a tab (#12799)....
Jean-Philippe Lang -
r10929:956239fc855a
parent child
Show More
@@ -69,7 +69,7 module Redmine
69 l = 1
69 l = 1
70 started = false
70 started = false
71 ended = false
71 ended = false
72 text.scan(/(((?:.*?)(\A|\r?\n\s*\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+))?[ \t](.*?)$)|.*)/m).each do |all, content, lf, heading, level|
73 if heading.nil?
73 if heading.nil?
74 if ended
74 if ended
75 after << all
75 after << all
@@ -419,6 +419,20 STR
419 end
419 end
420 end
420 end
421
421
422 def test_get_section_should_support_headings_starting_with_a_tab
423 text = <<-STR
424 h1.\tHeading 1
425
426 Content 1
427
428 h1. Heading 2
429
430 Content 2
431 STR
432
433 assert_match /\Ah1.\tHeading 1\s+Content 1\z/, @formatter.new(text).get_section(1).first
434 end
435
422 private
436 private
423
437
424 def assert_html_output(to_test, expect_paragraph = true)
438 def assert_html_output(to_test, expect_paragraph = true)
General Comments 0
You need to be logged in to leave comments. Login now