mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
code cleanup: rubocop: fix Style/WhileUntilModifier in lib/redmine/wiki_formatting/textile/redcloth3.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18738 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
30964255f1
commit
e3397db933
@ -1453,7 +1453,6 @@ Style/WhileUntilModifier:
|
|||||||
- 'app/models/project.rb'
|
- 'app/models/project.rb'
|
||||||
- 'lib/redmine/unified_diff.rb'
|
- 'lib/redmine/unified_diff.rb'
|
||||||
- 'lib/redmine/utils.rb'
|
- 'lib/redmine/utils.rb'
|
||||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
|
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
|
||||||
|
|||||||
@ -1022,9 +1022,9 @@ class RedCloth3 < String
|
|||||||
def flush_left( text )
|
def flush_left( text )
|
||||||
indt = 0
|
indt = 0
|
||||||
if text =~ /^ /
|
if text =~ /^ /
|
||||||
while text !~ /^ {#{indt}}[^ ]/
|
unless text.empty?
|
||||||
indt += 1
|
indt += 1 while text !~ /^ {#{indt}}[^ ]/
|
||||||
end unless text.empty?
|
end
|
||||||
if indt.nonzero?
|
if indt.nonzero?
|
||||||
text.gsub!( /^ {#{indt}}/, '' )
|
text.gsub!( /^ {#{indt}}/, '' )
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user