mirror of
https://github.com/jekyll/jekyll.git
synced 2026-02-02 02:35:17 -05:00
Fix keep_files to be used as paths relative to the destination.
They were used as keywords to match files containing them in the paths.
This commit is contained in:
@@ -94,11 +94,12 @@ module Jekyll
|
||||
# Private: Creates a regular expression from the config's keep_files array
|
||||
#
|
||||
# Examples
|
||||
# ['.git','.svn'] creates the following regex: /\/(\.git|\/.svn)/
|
||||
# ['.git','.svn'] with site.dest "/myblog/_site" creates
|
||||
# the following regex: /\/myblog\/_site\/(\.git|\/.svn)/
|
||||
#
|
||||
# Returns the regular expression
|
||||
def keep_file_regex
|
||||
Regexp.union(site.keep_files)
|
||||
/#{Regexp.quote(site.dest)}\/(#{Regexp.union(site.keep_files).source})/
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user