Use +rb switches when reading in file for checking existence of YAML header.
Fixes #2228.
This commit is contained in:
parent
5d6a07e060
commit
29fdc0946a
|
@ -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!
|
||||
|
|
Loading…
Reference in New Issue