Fix keep_files not to match a file with repeated path.
This commit is contained in:
parent
3b60237cb1
commit
1eb626b1df
|
@ -95,11 +95,11 @@ module Jekyll
|
|||
#
|
||||
# Examples
|
||||
# ['.git','.svn'] with site.dest "/myblog/_site" creates
|
||||
# the following regex: /\/myblog\/_site\/(\.git|\/.svn)/
|
||||
# the following regex: /\A\/myblog\/_site\/(\.git|\/.svn)/
|
||||
#
|
||||
# Returns the regular expression
|
||||
def keep_file_regex
|
||||
/#{Regexp.quote(site.dest)}\/(#{Regexp.union(site.keep_files).source})/
|
||||
/\A#{Regexp.quote(site.dest)}\/(#{Regexp.union(site.keep_files).source})/
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue