1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-10-17 17:01:01 +00:00

code cleanup: rubocop: fix Style/IfWithSemicolon in lib/redmine/wiki_formatting/textile/redcloth3.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18680 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-10-15 11:48:37 +00:00
parent 695a03b3eb
commit c82054a651
2 changed files with 1 additions and 5 deletions

View File

@ -1105,10 +1105,6 @@ Style/IfUnlessModifierOfIfUnless:
Exclude:
- 'app/models/attachment.rb'
Style/IfWithSemicolon:
Exclude:
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
# Cop supports --auto-correct.
# Configuration parameters: InverseMethods, InverseBlocks.
Style/InverseMethods:

View File

@ -739,7 +739,7 @@ class RedCloth3 < String
SETEXT_RE = /\A(.+?)\n([=-])[=-]* *$/m
def block_markdown_setext( text )
if text =~ SETEXT_RE
tag = if $2 == "="; "h1"; else; "h2"; end
tag = ($2 == "=" ? "h1" : "h2")
blk, cont = "<#{ tag }>#{ $1 }</#{ tag }>", $'
blocks cont
text.replace( blk + cont )