summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-15 11:48:25 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-15 11:48:25 +0000
commit695a03b3ebb7e4253f1af38ab383a426a871d9c4 (patch)
tree5b34ee0315f527d9679a74357bf97de916272612
parent76be6f712fad1fa37292ad6bfc6975154dd00050 (diff)
downloadredmine-695a03b3ebb7e4253f1af38ab383a426a871d9c4.tar.gz
redmine-695a03b3ebb7e4253f1af38ab383a426a871d9c4.zip
code cleanup: rubocop: fix Layout/IndentAssignment in lib/redmine/wiki_formatting/textile/redcloth3.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18679 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--.rubocop_todo.yml1
-rw-r--r--lib/redmine/wiki_formatting/textile/redcloth3.rb27
2 files changed, 12 insertions, 16 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index d5baa92e7..8daaec7ba 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -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.
diff --git a/lib/redmine/wiki_formatting/textile/redcloth3.rb b/lib/redmine/wiki_formatting/textile/redcloth3.rb
index af2e7bcf3..300afdc11 100644
--- a/lib/redmine/wiki_formatting/textile/redcloth3.rb
+++ b/lib/redmine/wiki_formatting/textile/redcloth3.rb
@@ -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