Remove duplicate regexp phrase: ^\A.
Addresses @mastahyeti's comment in #3077: https://github.com/jekyll/jekyll/pull/3077#discussion_r20077150
This commit is contained in:
parent
c79fe1125c
commit
bd907c5be6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue