diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4c56f5509..ba061adfb 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -917,11 +917,6 @@ Style/BlockDelimiters: Style/BracesAroundHashParameters: Enabled: false -# Cop supports --auto-correct. -Style/CharacterLiteral: - Exclude: - - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' - # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, EnforcedStyle. # SupportedStyles: nested, compact @@ -1225,7 +1220,6 @@ Style/ParenthesesAroundCondition: - 'lib/redmine/helpers/gantt.rb' - 'lib/redmine/scm/adapters/cvs_adapter.rb' - 'lib/redmine/scm/adapters/git_adapter.rb' - - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb index a4b6f3bab..b52028205 100644 --- a/lib/redmine/wiki_formatting/textile/redcloth3.rb +++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb @@ -673,7 +673,7 @@ class RedCloth3 < String block_applied = 0 @rules.each do |rule_name| - block_applied += 1 if ( rule_name.to_s.match /^block_/ and method( rule_name ).call( blk ) ) + block_applied += 1 if rule_name.to_s.match /^block_/ and method(rule_name).call(blk) end if block_applied.zero? if deep_code @@ -836,7 +836,7 @@ class RedCloth3 < String # Idea below : an URL with unbalanced parethesis and # ending by ')' is put into external parenthesis - if ( url[-1]==?) and ((url.count("(") - url.count(")")) < 0 ) ) + if url[-1] == ")" and ((url.count("(") - url.count(")")) < 0) url=url[0..-2] # discard closing parenth from url post = ")"+post # add closing parenth to post end