From: Toshi MARUYAMA Date: Tue, 22 Oct 2019 15:54:48 +0000 (+0000) Subject: code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/models/wiki_page.rb X-Git-Tag: 4.1.0~268 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f077a0a480fedc2ef55b7da6ab455636a7905b9a;p=redmine.git code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/models/wiki_page.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18835 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 46fc37d7a..c25f0ffce 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1144,7 +1144,6 @@ Style/ParallelAssignment: Style/ParenthesesAroundCondition: Exclude: - 'app/models/repository/subversion.rb' - - 'app/models/wiki_page.rb' - 'lib/diff.rb' - 'lib/redmine/helpers/gantt.rb' - 'lib/redmine/scm/adapters/cvs_adapter.rb' diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index ede750e80..422034243 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -304,7 +304,7 @@ class WikiAnnotate @lines = current_lines.collect {|t| [nil, nil, t]} positions = [] current_lines.size.times {|i| positions << i} - while (current.previous) + while current.previous d = current.previous.text.split(/\r?\n/).diff(current.text.split(/\r?\n/)).diffs.flatten d.each_slice(3) do |s| sign, line = s[0], s[1]