mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 19:47:14 +00:00
Fix RuboCop offense Style/RedundantRegexpEscape in lib/redmine/wiki_formatting/section_helper.rb (#40716).
git-svn-id: https://svn.redmine.org/redmine/trunk@22905 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2b786a6f48
commit
f143314584
@ -1359,7 +1359,6 @@ Style/RedundantRegexpEscape:
|
||||
- 'lib/redmine/scm/adapters/bazaar_adapter.rb'
|
||||
- 'lib/redmine/wiki_formatting/links_helper.rb'
|
||||
- 'lib/redmine/wiki_formatting/macros.rb'
|
||||
- 'lib/redmine/wiki_formatting/section_helper.rb'
|
||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
||||
- 'test/helpers/application_helper_test.rb'
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ module Redmine
|
||||
i = 0
|
||||
l = 1
|
||||
inside_pre = false
|
||||
@text.split(/(^(?:\S+\r?\n\r?(?:\=+|\-+)|#+.+|(?:~~~|```).*)\s*$)/).each do |part|
|
||||
@text.split(/(^(?:\S+\r?\n\r?(?:=+|-+)|#+.+|(?:~~~|```).*)\s*$)/).each do |part|
|
||||
level = nil
|
||||
if part =~ /\A(~{3,}|`{3,})(\s*\S+)?\s*$/
|
||||
if !inside_pre
|
||||
@ -54,7 +54,7 @@ module Redmine
|
||||
# nop
|
||||
elsif part =~ /\A(#+).+/
|
||||
level = $1.size
|
||||
elsif part =~ /\A.+\r?\n\r?(\=+|\-+)\s*$/
|
||||
elsif part =~ /\A.+\r?\n\r?(=+|-+)\s*$/
|
||||
level = $1.include?('=') ? 1 : 2
|
||||
end
|
||||
if level
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user