don't try to parse frontmatter from binary files, duh

This commit is contained in:
Thomas Reynolds 2011-11-10 15:35:53 -08:00
parent d018511606
commit 610509b373
2 changed files with 4 additions and 2 deletions

View file

@ -76,6 +76,9 @@ module Middleman::CoreExtensions::FrontMatter
end end
def touch_file(file) def touch_file(file)
extension = File.extname(file).sub(/\./, "")
return unless ::Tilt.mappings.has_key?(extension)
content = File.read(file) content = File.read(file)
file = file.sub(@source, "") file = file.sub(@source, "")
result = parse_front_matter(content) result = parse_front_matter(content)

View file

@ -23,7 +23,6 @@ module Middleman
options_hash << ", :#{k} => '#{v}'" options_hash << ", :#{k} => '#{v}'"
end end
$stderr.puts options_hash.inspect
guardfile_contents = %Q{ guardfile_contents = %Q{
guard 'middleman'#{options_hash} do guard 'middleman'#{options_hash} do
watch(%r{(.*)}) watch(%r{(.*)})