From bd907c5be68070ad9f4411e4d614a9ed48e46118 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Mon, 10 Nov 2014 11:36:05 -0800 Subject: [PATCH] Remove duplicate regexp phrase: ^\A. Addresses @mastahyeti's comment in #3077: https://github.com/jekyll/jekyll/pull/3077#discussion_r20077150 --- lib/jekyll.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll.rb b/lib/jekyll.rb index ce94b64b..03724100 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -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