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

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

index d5baa92e7eb02b69b83cae13493e64c3c128d19b..8daaec7ba1bb130ddd007999c06f84220d48c4aa 100644 (file)
@@ -214,7 +214,6 @@ Layout/ExtraSpacing:
 Layout/IndentAssignment:
   Exclude:
     - 'app/helpers/application_helper.rb'
-    - 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
     - 'test/unit/lib/redmine/helpers/gantt_test.rb'
 
 # Cop supports --auto-correct.
index af2e7bcf3ed1af11c31d156bd14784def6e32418..300afdc11928acfe2d4b9188614c76f5731bab3f 100644 (file)
@@ -327,17 +327,14 @@ class RedCloth3 < String
     # (from PyTextile)
     #
     TEXTILE_TAGS =
-
-        [[128, 8364], [129, 0], [130, 8218], [131, 402], [132, 8222], [133, 8230],
-         [134, 8224], [135, 8225], [136, 710], [137, 8240], [138, 352], [139, 8249],
-         [140, 338], [141, 0], [142, 0], [143, 0], [144, 0], [145, 8216], [146, 8217],
-         [147, 8220], [148, 8221], [149, 8226], [150, 8211], [151, 8212], [152, 732],
-         [153, 8482], [154, 353], [155, 8250], [156, 339], [157, 0], [158, 0], [159, 376]].
-
-        collect! do |a, b|
-            [a.chr, ( b.zero? and "" or "&#{ b };" )]
-        end
-
+      [[128, 8364], [129, 0], [130, 8218], [131, 402], [132, 8222], [133, 8230],
+       [134, 8224], [135, 8225], [136, 710], [137, 8240], [138, 352], [139, 8249],
+       [140, 338], [141, 0], [142, 0], [143, 0], [144, 0], [145, 8216], [146, 8217],
+       [147, 8220], [148, 8221], [149, 8226], [150, 8211], [151, 8212], [152, 732],
+       [153, 8482], [154, 353], [155, 8250], [156, 339], [157, 0], [158, 0], [159, 376]].
+         collect! do |a, b|
+           [a.chr, ( b.zero? and "" or "&#{ b };" )]
+         end
     #
     # Regular expressions to convert to HTML.
     #
@@ -381,8 +378,8 @@ class RedCloth3 < String
     QTAGS.collect! do |rc, ht, rtype|
         rcq = Regexp::quote rc
         re =
-            case rtype
-            when :limit
+          case rtype
+          when :limit
                 /(^|[>\s\(])          # sta
                 (?!\-\-)
                 (#{QTAGS_JOIN}|)      # oqs
@@ -392,13 +389,13 @@ class RedCloth3 < String
                 #{rcq}
                 (#{QTAGS_JOIN}|)      # oqa
                 (?=[[:punct:]]|<|\s|\)|$)/x
-            else
+          else
                 /(#{rcq})
                 (#{C})
                 (?::(\S+))?
                 ([[:word:]]|[^\s\-].*?[^\s\-])
                 #{rcq}/xm
-            end
+          end
         [rc, ht, re, rtype]
     end