use regex to verify yaml existence

This commit is contained in:
Ben Balter 2014-04-11 08:00:40 -04:00
parent 6c0f40385c
commit 387cf2181a
1 changed files with 1 additions and 1 deletions

View File

@ -374,7 +374,7 @@ module Jekyll
end end
def has_yaml_header?(file) def has_yaml_header?(file)
"---\n" == File.open(file) { |fd| fd.read(4) } !!(File.open(file).read =~ /^---\r?\n/)
end end
def limit_posts! def limit_posts!