mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 07:21:12 +00:00
code cleanup: rubocop: fix Style/CharacterLiteral and Style/ParenthesesAroundCondition in lib/redmine/wiki_formatting/textile/redcloth3.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18720 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cae3f78eba
commit
8bac080b8c
@ -917,11 +917,6 @@ Style/BlockDelimiters:
|
|||||||
Style/BracesAroundHashParameters:
|
Style/BracesAroundHashParameters:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Style/CharacterLiteral:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
||||||
# SupportedStyles: nested, compact
|
# SupportedStyles: nested, compact
|
||||||
@ -1225,7 +1220,6 @@ Style/ParenthesesAroundCondition:
|
|||||||
- 'lib/redmine/helpers/gantt.rb'
|
- 'lib/redmine/helpers/gantt.rb'
|
||||||
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
|
- 'lib/redmine/scm/adapters/cvs_adapter.rb'
|
||||||
- 'lib/redmine/scm/adapters/git_adapter.rb'
|
- 'lib/redmine/scm/adapters/git_adapter.rb'
|
||||||
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
|
||||||
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: PreferredDelimiters.
|
# Configuration parameters: PreferredDelimiters.
|
||||||
|
|||||||
@ -673,7 +673,7 @@ class RedCloth3 < String
|
|||||||
|
|
||||||
block_applied = 0
|
block_applied = 0
|
||||||
@rules.each do |rule_name|
|
@rules.each do |rule_name|
|
||||||
block_applied += 1 if ( rule_name.to_s.match /^block_/ and method( rule_name ).call( blk ) )
|
block_applied += 1 if rule_name.to_s.match /^block_/ and method(rule_name).call(blk)
|
||||||
end
|
end
|
||||||
if block_applied.zero?
|
if block_applied.zero?
|
||||||
if deep_code
|
if deep_code
|
||||||
@ -836,7 +836,7 @@ class RedCloth3 < String
|
|||||||
|
|
||||||
# Idea below : an URL with unbalanced parethesis and
|
# Idea below : an URL with unbalanced parethesis and
|
||||||
# ending by ')' is put into external parenthesis
|
# 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 parenth from url
|
url=url[0..-2] # discard closing parenth from url
|
||||||
post = ")"+post # add closing parenth to post
|
post = ")"+post # add closing parenth to post
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user