Patch #38146 » 0008-Fix-RuboCop-offense-Performance-RedundantSplitRegexp.patch
| .rubocop_todo.yml | ||
|---|---|---|
|
- 'test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb'
|
||
|
- 'test/unit/project_test.rb'
|
||
|
# This cop supports safe autocorrection (--autocorrect).
|
||
|
Performance/RedundantSplitRegexpArgument:
|
||
|
Exclude:
|
||
|
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
||
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||
|
# Configuration parameters: OnlySumOrWithInitialValue.
|
||
|
Performance/Sum:
|
||
| lib/redmine/wiki_formatting/textile/redcloth3.rb | ||
|---|---|---|
|
# Parses Textile lists and generates HTML
|
||
|
def block_textile_lists( text )
|
||
|
text.gsub!( LISTS_RE ) do |match|
|
||
|
lines = match.split( /\n/ )
|
||
|
lines = match.split( "\n" )
|
||
|
last_line = -1
|
||
|
depth = []
|
||
|
lines.each_with_index do |line, line_id|
|
||
| ... | ... | |
|
def block_textile_quotes( text )
|
||
|
text.gsub!( QUOTES_RE ) do |match|
|
||
|
lines = match.split( /\n/ )
|
||
|
lines = match.split( "\n" )
|
||
|
quotes = +''
|
||
|
indent = 0
|
||
|
lines.each do |line|
|
||
- « Previous
- 1
- …
- 7
- 8
- 9
- Next »