Patch #38146 » 0008-Fix-RuboCop-offense-Performance-RedundantSplitRegexp.patch
.rubocop_todo.yml | ||
---|---|---|
486 | 486 |
- 'test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb' |
487 | 487 |
- 'test/unit/project_test.rb' |
488 | 488 | |
489 |
# This cop supports safe autocorrection (--autocorrect). |
|
490 |
Performance/RedundantSplitRegexpArgument: |
|
491 |
Exclude: |
|
492 |
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb' |
|
493 | ||
494 | 489 |
# This cop supports unsafe autocorrection (--autocorrect-all). |
495 | 490 |
# Configuration parameters: OnlySumOrWithInitialValue. |
496 | 491 |
Performance/Sum: |
lib/redmine/wiki_formatting/textile/redcloth3.rb | ||
---|---|---|
558 | 558 |
# Parses Textile lists and generates HTML |
559 | 559 |
def block_textile_lists( text ) |
560 | 560 |
text.gsub!( LISTS_RE ) do |match| |
561 |
lines = match.split( /\n/ )
|
|
561 |
lines = match.split( "\n" )
|
|
562 | 562 |
last_line = -1 |
563 | 563 |
depth = [] |
564 | 564 |
lines.each_with_index do |line, line_id| |
... | ... | |
603 | 603 | |
604 | 604 |
def block_textile_quotes( text ) |
605 | 605 |
text.gsub!( QUOTES_RE ) do |match| |
606 |
lines = match.split( /\n/ )
|
|
606 |
lines = match.split( "\n" )
|
|
607 | 607 |
quotes = +'' |
608 | 608 |
indent = 0 |
609 | 609 |
lines.each do |line| |
- « Previous
- 1
- …
- 7
- 8
- 9
- Next »