]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Style/IfWithSemicolon in lib/redmine/wiki_formatting/texti...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 15 Oct 2019 11:48:37 +0000 (11:48 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 15 Oct 2019 11:48:37 +0000 (11:48 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18680 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/redmine/wiki_formatting/textile/redcloth3.rb

index 8daaec7ba1bb130ddd007999c06f84220d48c4aa..fed9e59e5f73bc13d3ff247af9b58a6c1cb038d5 100644 (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:
index 300afdc11928acfe2d4b9188614c76f5731bab3f..d68c3a264308823d31b5661ca16b000bf4991571 100644 (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 )