From 571fb95cc1896f80512e200d74a5610cb01074c8 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 15 Apr 2014 09:48:44 -0400 Subject: [PATCH] Only read in 5 bytes when checking for YAML header. #2211 #2210 --- lib/jekyll/site.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index a095c81f..43618dc2 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -419,7 +419,7 @@ module Jekyll end def has_yaml_header?(file) - !!(File.open(file, "rb").read =~ /\A---\r?\n/) + !!(File.open(file, "rb").read(5) =~ /\A---\r?\n/) end def limit_posts!