]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Style/UnlessElse in lib/redmine/wiki_formatting/textile...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 19 Oct 2019 07:26:45 +0000 (07:26 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 19 Oct 2019 07:26:45 +0000 (07:26 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18737 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/redmine/wiki_formatting/textile/redcloth3.rb

index 265bcb04d3903c56043b1c5935de6bd5b0697b02..76389e5635f4af31722eb7e6a3ebb53accaad123 100644 (file)
@@ -1408,7 +1408,6 @@ Style/UnlessElse:
     - 'app/controllers/trackers_controller.rb'
     - 'lib/redmine/scm/adapters/abstract_adapter.rb'
     - 'lib/redmine/unified_diff.rb'
-    - 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
 
 # Cop supports --auto-correct.
 Style/UnneededCondition:
index 786db052f56ff4647702bc4ca58bfd3e9be0ecab..5d7ac768bed81094c7e008c42f617e0d1c91bff8 100644 (file)
@@ -575,7 +575,7 @@ class RedCloth3 < String
                             lines[line_id - 1] << '</li>'
                         end
                     end
-                    unless depth.last == tl
+                    if depth.last != tl
                         depth << tl
                         atts = pba( atts )
                         atts = shelve( atts ) if atts
@@ -584,7 +584,6 @@ class RedCloth3 < String
                         lines[line_id] = +"\t\t<li>#{content}"
                     end
                     last_line = line_id
-
                 else
                     last_line = line_id
                 end