Skip to content

Commit

Permalink
SimpleFileExtractor ignores blanks around patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
prioux committed Aug 27, 2024
1 parent 6ce92ad commit e330955
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def after_form #:nodoc:

# Clean up pattern list
patterns = patterns_as_array(params[:patterns].presence || {})
patterns = patterns.map(&:presence).compact
patterns = patterns.map(&:presence).compact.map(&:strip).map(&:presence).compact # ignore blanks at each end
patterns = patterns.map { |pat| Pathname.new(pat).cleanpath }
params[:patterns] = patterns_as_hash(patterns.map(&:to_s)) # write back cleaned list

Expand Down

0 comments on commit e330955

Please sign in to comment.