Browse Source

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
tags/4.1.0
Toshi MARUYAMA 4 years ago
parent
commit
e3397db933
2 changed files with 3 additions and 4 deletions
  1. 0
    1
      .rubocop_todo.yml
  2. 3
    3
      lib/redmine/wiki_formatting/textile/redcloth3.rb

+ 0
- 1
.rubocop_todo.yml View File

@@ -1453,7 +1453,6 @@ Style/WhileUntilModifier:
- 'app/models/project.rb'
- 'lib/redmine/unified_diff.rb'
- 'lib/redmine/utils.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.

+ 3
- 3
lib/redmine/wiki_formatting/textile/redcloth3.rb View File

@@ -1022,9 +1022,9 @@ class RedCloth3 < String
def flush_left( text )
indt = 0
if text =~ /^ /
while text !~ /^ {#{indt}}[^ ]/
indt += 1
end unless text.empty?
unless text.empty?
indt += 1 while text !~ /^ {#{indt}}[^ ]/
end
if indt.nonzero?
text.gsub!( /^ {#{indt}}/, '' )
end

Loading…
Cancel
Save