From 2ee8d690c41244d26ec027402c349b70f97d46bc Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 21 Oct 2014 09:01:06 -0700 Subject: [PATCH] More conversion of Jekyll.sanitized_path ~> site.in_(source|dest)_dir --- lib/jekyll/document.rb | 2 +- lib/jekyll/page.rb | 3 +-- lib/jekyll/post.rb | 3 +-- lib/jekyll/static_file.rb | 3 +-- lib/jekyll/tags/include.rb | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/jekyll/document.rb b/lib/jekyll/document.rb index 0ab0cb72..003c04eb 100644 --- a/lib/jekyll/document.rb +++ b/lib/jekyll/document.rb @@ -160,7 +160,7 @@ module Jekyll # Returns the full path to the output file of this document. def destination(base_directory) dest = site.in_dest_dir(base_directory) - path = Jekyll.sanitized_path(dest, url) + path = site.in_dest_dir(dest, url) path = File.join(path, "index.html") if url =~ /\/$/ path end diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index 0cd3cf0a..98f730bf 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -140,8 +140,7 @@ module Jekyll # # Returns the destination file path String. def destination(dest) - dest = site.in_dest_dir(dest) - path = Jekyll.sanitized_path(dest, URL.unescape_path(url)) + path = site.in_dest_dir(dest, URL.unescape_path(url)) path = File.join(path, "index.html") if url =~ /\/$/ path end diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 7f0976e7..c377e376 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -268,8 +268,7 @@ module Jekyll # Returns destination file path String. def destination(dest) # The url needs to be unescaped in order to preserve the correct filename - dest = site.in_dest_dir(dest) - path = Jekyll.sanitized_path(dest, URL.unescape_path(url)) + path = site.in_dest_dir(dest, URL.unescape_path(url)) path = File.join(path, "index.html") if path[/\.html?$/].nil? path end diff --git a/lib/jekyll/static_file.rb b/lib/jekyll/static_file.rb index 8217d2fd..eae85b54 100644 --- a/lib/jekyll/static_file.rb +++ b/lib/jekyll/static_file.rb @@ -37,8 +37,7 @@ module Jekyll # # Returns destination file path. def destination(dest) - dest = @site.in_dest_dir(dest) - Jekyll.sanitized_path(dest, File.join(*[destination_rel_dir, @name].compact)) + @site.in_dest_dir(*[dest, destination_rel_dir, @name].compact) end def destination_rel_dir diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index c6b1ed9c..3eb4d7c0 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -161,7 +161,7 @@ eos end def resolved_includes_dir(context) - Jekyll.sanitized_path(context.registers[:site].source, page_path(context)) + context.registers[:site].in_source_dir(page_path(context)) end end end