use Array.join instead of Array.inject, add .svn to defaults
This commit is contained in:
parent
3da0bb3a74
commit
4bae42a671
|
@ -59,7 +59,7 @@ module Jekyll
|
||||||
'source' => Dir.pwd,
|
'source' => Dir.pwd,
|
||||||
'destination' => File.join(Dir.pwd, '_site'),
|
'destination' => File.join(Dir.pwd, '_site'),
|
||||||
'plugins' => File.join(Dir.pwd, '_plugins'),
|
'plugins' => File.join(Dir.pwd, '_plugins'),
|
||||||
'keep_files' => ['.git'],
|
'keep_files' => ['.git','.svn'],
|
||||||
'layouts' => '_layouts',
|
'layouts' => '_layouts',
|
||||||
|
|
||||||
'future' => true,
|
'future' => true,
|
||||||
|
|
|
@ -251,7 +251,7 @@ module Jekyll
|
||||||
# create a regex from the keep_files array
|
# create a regex from the keep_files array
|
||||||
# ['.git','.svn'] => /\/(\.git|\/.svn)/
|
# ['.git','.svn'] => /\/(\.git|\/.svn)/
|
||||||
def keep_file_regex
|
def keep_file_regex
|
||||||
or_list = self.keep_files.map.inject("") { |x,y| "#{x}|#{y}" }[1..-1]
|
or_list = self.keep_files.join("|")
|
||||||
pattern = "\/(#{or_list.gsub(".", "\.")})"
|
pattern = "\/(#{or_list.gsub(".", "\.")})"
|
||||||
Regexp.new pattern
|
Regexp.new pattern
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue