Only read in 5 bytes when checking for YAML header.

#2211 #2210
This commit is contained in:
Parker Moore 2014-04-15 09:48:44 -04:00
parent 29fdc0946a
commit 571fb95cc1
1 changed files with 1 additions and 1 deletions

View File

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