mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
code cleanup: rubocop: fix Style/CharacterLiteral and Style/ParenthesesAroundCondition in lib/redmine/wiki_formatting.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18719 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f891a28152
commit
cae3f78eba
@ -920,7 +920,6 @@ Style/BracesAroundHashParameters:
|
||||
# Cop supports --auto-correct.
|
||||
Style/CharacterLiteral:
|
||||
Exclude:
|
||||
- 'lib/redmine/wiki_formatting.rb'
|
||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
||||
|
||||
# Cop supports --auto-correct.
|
||||
@ -1226,7 +1225,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.rb'
|
||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
||||
|
||||
# Cop supports --auto-correct.
|
||||
|
||||
@ -144,7 +144,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] == ")" and ((url.count("(") - url.count(")")) < 0)
|
||||
url = url[0..-2] # discard closing parenthesis from url
|
||||
post = ")" + post # add closing parenthesis to post
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user