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:
Parker Moore 2014-11-10 11:36:05 -08:00
parent c79fe1125c
commit bd907c5be6
1 changed files with 2 additions and 2 deletions

View File

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