lib/find_files.rb in markdown_exec-2.0.4 vs lib/find_files.rb in markdown_exec-2.0.5
- old
+ new
@@ -35,12 +35,10 @@
# Use Dir.glob with the File::FNM_DOTMATCH flag to include hidden files
files = Dir.glob(search_pattern, File::FNM_DOTMATCH)
# Optionally exclude "." and ".." and directory names
- if exclude_dirs
- files.reject! { |file| file.end_with?('/.', '/..') || File.directory?(file) }
- end
+ files.reject! { |file| file.end_with?('/.', '/..') || File.directory?(file) } if exclude_dirs
matched_files += files
end
matched_files.uniq