From 3a3405fe51c8ae4510f6b50473557dd6c9ad6248 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Thu, 26 May 2016 16:09:56 -0700 Subject: [PATCH] I will chain blocks if I want to chain blocks. --- lib/jekyll/readers/post_reader.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/jekyll/readers/post_reader.rb b/lib/jekyll/readers/post_reader.rb index ec5bc7ad..123709e7 100644 --- a/lib/jekyll/readers/post_reader.rb +++ b/lib/jekyll/readers/post_reader.rb @@ -32,16 +32,14 @@ module Jekyll # # Returns nothing. def read_publishable(dir, magic_dir, matcher) - documents = read_content(dir, magic_dir, matcher).tap do |docs| - docs.each(&:read) - end - documents.select do |doc| - site.publisher.publish?(doc).tap do |will_publish| - if !will_publish && site.publisher.hidden_in_the_future?(doc) - Jekyll.logger.debug "Skipping:", "#{doc.relative_path} has a future date" + read_content(dir, magic_dir, matcher).tap { |docs| docs.each(&:read) } + .select do |doc| + site.publisher.publish?(doc).tap do |will_publish| + if !will_publish && site.publisher.hidden_in_the_future?(doc) + Jekyll.logger.debug "Skipping:", "#{doc.relative_path} has a future date" + end end end - end end # Read all the content files from //magic_dir