mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 17:28:29 -05:00
Merge pull request #3089 from jekyll/remove-duplication-in-regexp
This commit is contained in:
@@ -144,9 +144,9 @@ module Jekyll
|
||||
return base_directory if base_directory.eql?(questionable_path)
|
||||
|
||||
clean_path = File.expand_path(questionable_path, "/")
|
||||
clean_path = clean_path.sub(/^\A\w\:\//, '/')
|
||||
clean_path = clean_path.sub(/\A\w\:\//, '/')
|
||||
|
||||
unless clean_path.start_with?(base_directory.sub(/^\A\w\:\//, '/'))
|
||||
unless clean_path.start_with?(base_directory.sub(/\A\w\:\//, '/'))
|
||||
File.join(base_directory, clean_path)
|
||||
else
|
||||
clean_path
|
||||
|
||||
Reference in New Issue
Block a user