summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.rubocop_todo.yml7
-rw-r--r--lib/redmine/wiki_formatting/links_helper.rb2
2 files changed, 4 insertions, 5 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 114509d29..4ca32dcd0 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1070,7 +1070,6 @@ Style/AndOr:
- 'lib/redmine/scm/adapters/filesystem_adapter.rb'
- 'lib/redmine/scm/adapters/git_adapter.rb'
- 'lib/redmine/scm/adapters/subversion_adapter.rb'
- - 'lib/redmine/wiki_formatting.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
# Cop supports --auto-correct.
@@ -1399,7 +1398,7 @@ Style/MultilineIfModifier:
- 'app/models/time_entry_query.rb'
- 'app/views/common/feed.atom.builder'
- 'lib/redmine/helpers/gantt.rb'
- - 'lib/redmine/wiki_formatting.rb'
+ - 'lib/redmine/wiki_formatting/links_helper.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
# Cop supports --auto-correct.
@@ -1615,7 +1614,7 @@ Style/RedundantInterpolation:
- 'app/views/journals/index.builder'
- 'lib/redmine/helpers/time_report.rb'
- 'lib/redmine/scm/adapters/subversion_adapter.rb'
- - 'lib/redmine/wiki_formatting.rb'
+ - 'lib/redmine/wiki_formatting/links_helper.rb'
- 'test/functional/versions_controller_test.rb'
- 'test/functional/watchers_controller_test.rb'
@@ -1791,7 +1790,7 @@ Style/StringLiteralsInInterpolation:
- 'app/models/issue_query.rb'
- 'config/environment.rb'
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
- - 'lib/redmine/wiki_formatting.rb'
+ - 'lib/redmine/wiki_formatting/links_helper.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
- 'test/unit/member_test.rb'
diff --git a/lib/redmine/wiki_formatting/links_helper.rb b/lib/redmine/wiki_formatting/links_helper.rb
index 2e057df3e..a9c902b7d 100644
--- a/lib/redmine/wiki_formatting/links_helper.rb
+++ b/lib/redmine/wiki_formatting/links_helper.rb
@@ -52,7 +52,7 @@ module Redmine
else
# Idea below : an URL with unbalanced parenthesis and
# ending by ')' is put into external parenthesis
- if url[-1] == ")" and ((url.count("(") - url.count(")")) < 0)
+ if url[-1] == ")" && ((url.count("(") - url.count(")")) < 0)
url = url[0..-2] # discard closing parenthesis from url
post = ")" + post # add closing parenthesis to post
end