Use +rb switches when reading in file for checking existence of YAML header.

Fixes #2228.
This commit is contained in:
Parker Moore
2014-04-15 09:46:53 -04:00
parent 5d6a07e060
commit 29fdc0946a

View File

@@ -419,7 +419,7 @@ module Jekyll
end
def has_yaml_header?(file)
!!(File.open(file).read =~ /\A---\r?\n/)
!!(File.open(file, "rb").read =~ /\A---\r?\n/)
end
def limit_posts!