Fix keep_files not to match a file with repeated path.

This commit is contained in:
Shinnosuke Kondo 2015-07-13 19:08:11 -05:00
parent 3b60237cb1
commit 1eb626b1df
1 changed files with 2 additions and 2 deletions

View File

@ -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