summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-19 07:26:45 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-19 07:26:45 +0000
commit30964255f1f30b236db29b5ac50fc98aa93edfd9 (patch)
treeddc6ac25eff1bd6ceb27ced0c842a4b239685344
parentc4930a8a2dca2b7310e2caf27430c0f80fca38b1 (diff)
downloadredmine-30964255f1f30b236db29b5ac50fc98aa93edfd9.tar.gz
redmine-30964255f1f30b236db29b5ac50fc98aa93edfd9.zip
code cleanup: rubocop: fix Style/UnlessElse in lib/redmine/wiki_formatting/textile/redcloth3.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18737 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--.rubocop_todo.yml1
-rw-r--r--lib/redmine/wiki_formatting/textile/redcloth3.rb3
2 files changed, 1 insertions, 3 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 265bcb04d..76389e563 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -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:
diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb
index 786db052f..5d7ac768b 100644
--- a/lib/redmine/wiki_formatting/textile/redcloth3.rb
+++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb
@@ -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